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

Method processNode

src/core/runtime/runtime.js:927–944  ·  view source on GitHub ↗
(elt)

Source from the content-addressed store, hash-verified

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

Callers 8

morphMethod · 0.95
replaceInDomMethod · 0.95
_hyperscript.jsFile · 0.45
putIntoMethod · 0.45
resolveMethod · 0.45
resolveMethod · 0.45
initLiveTemplatesFunction · 0.45
stampFunction · 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