MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / trackQuery

Method trackQuery

www/js/_hyperscript.esm.js:3145–3153  ·  view source on GitHub ↗

* Track a DOM query as a dependency. Re-evaluates when any DOM * change occurs within root or its descendants. * @param {Element|Document} root - the element querySelectorAll runs on (e.g. #myTable in `<:checked/> in #myTable`)

(root)

Source from the content-addressed store, hash-verified

3143 * @param {Element|Document} root - the element querySelectorAll runs on (e.g. #myTable in `<:checked/> in #myTable`)
3144 */
3145 trackQuery(root) {
3146 if (!this._currentEffect) return;
3147 root = root || document;
3148 var key = "query:" + this._getObjectState(root).id;
3149 this._currentEffect.dependencies.set(
3150 key,
3151 { type: "query", root }
3152 );
3153 }
3154 /**
3155 * Notify that a global variable was written.
3156 * @param {string} name - Variable name

Callers 1

resolveQueryMethod · 0.45

Calls 2

_getObjectStateMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected