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

Method trackAttribute

tools/common/_hyperscript.iife.js:3083–3089  ·  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

3081 * @param {string} name - Attribute name
3082 */
3083 trackAttribute(element, name) {
3084 if (!(element instanceof Element)) return;
3085 this._currentEffect.dependencies.set(
3086 "attribute:" + name + ":" + this._getObjectState(element).id,
3087 { type: "attribute", element, name }
3088 );
3089 }
3090 /**
3091 * Notify that a global variable was written.
3092 * @param {string} name - Variable name

Callers 1

resolveAttributeMethod · 0.45

Calls 2

setMethod · 0.45
_getObjectStateMethod · 0.45

Tested by

no test coverage detected