MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / _scheduleEffect

Method _scheduleEffect

www/js/_hyperscript.esm.js:3205–3215  ·  view source on GitHub ↗

* Add an effect to the pending set. * Schedules a microtask to run them if one isn't already scheduled. * @param {Effect} effect

(effect)

Source from the content-addressed store, hash-verified

3203 * @param {Effect} effect
3204 */
3205 _scheduleEffect(effect) {
3206 if (effect._isStopped) return;
3207 this._pendingEffects.add(effect);
3208 if (!this._isRunScheduled) {
3209 this._isRunScheduled = true;
3210 var self2 = this;
3211 queueMicrotask(function() {
3212 self2._runPendingEffects();
3213 });
3214 }
3215 }
3216 /**
3217 * Set up the single global MutationObserver and delegated input/change
3218 * listeners that power attribute, property, and query tracking.

Callers 6

notifyGlobalSymbolMethod · 0.45
notifyElementSymbolMethod · 0.45
notifyPropertyMethod · 0.45
_handleDOMEventMethod · 0.45
_scheduleQueryEffectsMethod · 0.45

Calls 1

_runPendingEffectsMethod · 0.45

Tested by

no test coverage detected