MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / #findHsInclude

Method #findHsInclude

www/js/_hyperscript.js:3798–3808  ·  view source on GitHub ↗
(sourceElt)

Source from the content-addressed store, hash-verified

3796 }
3797 // ----- hs-include helpers -----
3798 static #findHsInclude(sourceElt) {
3799 var attr = sourceElt.getAttribute("hs-include");
3800 if (attr !== null) return { value: attr, scopeElt: sourceElt };
3801 var elt = sourceElt.parentElement;
3802 while (elt) {
3803 attr = elt.getAttribute("hs-include:inherited");
3804 if (attr !== null) return { value: attr, scopeElt: elt };
3805 elt = elt.parentElement;
3806 }
3807 return null;
3808 }
3809 static #readScope(elt) {
3810 return elt?._hyperscript?.elementScope || {};
3811 }

Callers 1

initMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected