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

Method trackQuery

www/js/_hyperscript.js:3147–3155  ·  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

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

Callers 1

resolveQueryMethod · 0.45

Calls 2

_getObjectStateMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected