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

Method trackAttribute

www/js/_hyperscript-max.js:3134–3140  ·  view source on GitHub ↗

* Track a DOM attribute read as a dependency. * @param {Element} element * @param {string} name - Attribute name

(element, name)

Source from the content-addressed store, hash-verified

3132 * @param {string} name - Attribute name
3133 */
3134 trackAttribute(element, name) {
3135 if (!(element instanceof Element)) return;
3136 this._currentEffect.dependencies.set(
3137 "attribute:" + name + ":" + this._getObjectState(element).id,
3138 { type: "attribute", element, name }
3139 );
3140 }
3141 /**
3142 * Track a DOM query as a dependency. Re-evaluates when any DOM
3143 * change occurs within root or its descendants.

Callers 1

resolveAttributeMethod · 0.45

Calls 2

setMethod · 0.45
_getObjectStateMethod · 0.45

Tested by

no test coverage detected