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

Method _scheduleEffect

tools/common/_hyperscript.iife.js:3136–3146  ·  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

3134 * @param {Effect} effect
3135 */
3136 _scheduleEffect(effect) {
3137 if (effect._isStopped) return;
3138 this._pendingEffects.add(effect);
3139 if (!this._isRunScheduled) {
3140 this._isRunScheduled = true;
3141 var self2 = this;
3142 queueMicrotask(function() {
3143 self2._runPendingEffects();
3144 });
3145 }
3146 }
3147 /**
3148 * Run all pending effects. Called once per microtask batch.
3149 * Effects that re-trigger during this run are queued for the next batch.

Callers 4

notifyGlobalSymbolMethod · 0.45
notifyElementSymbolMethod · 0.45
queueAllMethod · 0.45

Calls 1

_runPendingEffectsMethod · 0.45

Tested by

no test coverage detected