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

Method _scheduleQueryEffects

www/js/_hyperscript.js:3300–3309  ·  view source on GitHub ↗

* Schedule effects with query deps whose root includes any of the mutated elements. * @param {Set |Element} mutated - Element(s) where DOM changes occurred

(mutated)

Source from the content-addressed store, hash-verified

3298 * @param {Set<Element>|Element} mutated - Element(s) where DOM changes occurred
3299 */
3300 _scheduleQueryEffects(mutated) {
3301 if (this._querySubscriptions.size === 0) return;
3302 for (var [root, effects] of this._querySubscriptions) {
3303 if (this._containsTarget(root, mutated)) {
3304 for (var effect of effects) {
3305 this._scheduleEffect(effect);
3306 }
3307 }
3308 }
3309 }
3310 /** Check if any of the mutated elements are inside root. */
3311 _containsTarget(root, mutated) {
3312 if (mutated instanceof Set) {

Callers 2

_handleMutationsMethod · 0.45
_handleDOMEventMethod · 0.45

Calls 2

_containsTargetMethod · 0.45
_scheduleEffectMethod · 0.45

Tested by

no test coverage detected