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

Method processNode

www/js/_hyperscript.js:2882–2897  ·  view source on GitHub ↗
(elt)

Source from the content-addressed store, hash-verified

2880 this.#afterProcessHooks.push(fn);
2881 }
2882 processNode(elt) {
2883 for (var fn of this.#beforeProcessHooks) fn(elt);
2884 var selector = this.#getScriptSelector();
2885 if (this.matchesSelector(elt, selector)) {
2886 this.#initElement(elt, elt);
2887 }
2888 if (elt instanceof HTMLScriptElement && elt.type === "text/hyperscript") {
2889 this.#initElement(elt, document.body);
2890 }
2891 if (elt.querySelectorAll) {
2892 this.forEach(elt.querySelectorAll(selector + ", [type='text/hyperscript']"), (elt2) => {
2893 this.#initElement(elt2, elt2 instanceof HTMLScriptElement && elt2.type === "text/hyperscript" ? document.body : elt2);
2894 });
2895 }
2896 for (var fn of this.#afterProcessHooks) fn(elt);
2897 }
2898 // =================================================================
2899 // Debug and tracing
2900 // =================================================================

Callers 8

morphMethod · 0.95
replaceInDomMethod · 0.95
resolveMethod · 0.45
putIntoMethod · 0.45
resolveMethod · 0.45
initLiveTemplatesFunction · 0.45
stampFunction · 0.45
_hyperscript.jsFile · 0.45

Calls 5

#getScriptSelectorMethod · 0.95
matchesSelectorMethod · 0.95
#initElementMethod · 0.95
forEachMethod · 0.95
fnFunction · 0.85

Tested by

no test coverage detected