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

Method #getScript

tools/common/_hyperscript.iife.js:2715–2727  ·  view source on GitHub ↗
(elt)

Source from the content-addressed store, hash-verified

2713 return this.#scriptAttrs;
2714 }
2715 #getScript(elt) {
2716 var attrs = this.#getScriptAttributes();
2717 for (var i = 0; i < attrs.length; i++) {
2718 var scriptAttribute = attrs[i];
2719 if (elt.hasAttribute && elt.hasAttribute(scriptAttribute)) {
2720 return elt.getAttribute(scriptAttribute);
2721 }
2722 }
2723 if (elt instanceof HTMLScriptElement && elt.type === "text/hyperscript") {
2724 return elt.innerText;
2725 }
2726 return null;
2727 }
2728 #scriptSelector;
2729 #getScriptSelector() {
2730 if (!this.#scriptSelector) {

Callers 1

#initElementMethod · 0.95

Calls 1

#getScriptAttributesMethod · 0.95

Tested by

no test coverage detected