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

Method _scheduleAttributeEffects

www/js/_hyperscript.js:3285–3295  ·  view source on GitHub ↗

* Schedule effects watching a specific attribute on a specific element. * @param {Element} element * @param {string} attrName

(element, attrName)

Source from the content-addressed store, hash-verified

3283 * @param {string} attrName
3284 */
3285 _scheduleAttributeEffects(element, attrName) {
3286 var state = this._objectState.get(element);
3287 if (!state) return;
3288 var key = attrName + ":" + state.id;
3289 var subs = this._attributeSubscriptions.get(key);
3290 if (subs) {
3291 for (var effect of subs) {
3292 this._scheduleEffect(effect);
3293 }
3294 }
3295 }
3296 /**
3297 * Schedule effects with query deps whose root includes any of the mutated elements.
3298 * @param {Set<Element>|Element} mutated - Element(s) where DOM changes occurred

Callers 1

_handleMutationsMethod · 0.45

Calls 2

getMethod · 0.45
_scheduleEffectMethod · 0.45

Tested by

no test coverage detected