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

Method _scheduleAttributeEffects

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

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