MCPcopy Create free account
hub / github.com/bigskysoftware/_hyperscript / ensureFouceGuard

Function ensureFouceGuard

www/js/ext/component.js:626–633  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

624 const { runtime, createParser, reactivity } = _hyperscript.internals;
625 const tokenizer = new Tokenizer();
626 function ensureFouceGuard() {
627 if (typeof document === "undefined" || !document.head) return;
628 if (document.head.querySelector('style[data-hyperscript-component="fouce-guard"]')) return;
629 var styleEl = document.createElement("style");
630 styleEl.setAttribute("data-hyperscript-component", "fouce-guard");
631 styleEl.textContent = ":not(:defined) { visibility: hidden; }";
632 document.head.appendChild(styleEl);
633 }
634 function substituteSlots(templateSource, slotContent, scopeSel) {
635 if (!slotContent) return templateSource;
636 var tmp = document.createElement("div");

Callers 1

componentPluginFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected