(elt)
| 925 | addAfterProcessHook(fn) { this.#afterProcessHooks.push(fn); } |
| 926 | |
| 927 | processNode(elt) { |
| 928 | for (var fn of this.#beforeProcessHooks) fn(elt); |
| 929 | |
| 930 | var selector = this.#getScriptSelector(); |
| 931 | if (this.matchesSelector(elt, selector)) { |
| 932 | this.#initElement(elt, elt); |
| 933 | } |
| 934 | if (elt instanceof HTMLScriptElement && elt.type === "text/hyperscript") { |
| 935 | this.#initElement(elt, document.body); |
| 936 | } |
| 937 | if (elt.querySelectorAll) { |
| 938 | this.forEach(elt.querySelectorAll(selector + ", [type='text/hyperscript']"), elt => { |
| 939 | this.#initElement(elt, elt instanceof HTMLScriptElement && elt.type === "text/hyperscript" ? document.body : elt); |
| 940 | }); |
| 941 | } |
| 942 | |
| 943 | for (var fn of this.#afterProcessHooks) fn(elt); |
| 944 | } |
| 945 | |
| 946 | // ================================================================= |
| 947 | // Debug and tracing |
no test coverage detected