* 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)
| 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 |
no test coverage detected