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

Method _scheduleQueryEffects

www/js/_hyperscript-max.js:3299–3308  ·  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

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