MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / #getScript

Method #getScript

www/js/_hyperscript.esm.js:2726–2738  ·  view source on GitHub ↗
(elt)

Source from the content-addressed store, hash-verified

2724 return this.#scriptAttrs;
2725 }
2726 #getScript(elt) {
2727 var attrs = this.#getScriptAttributes();
2728 for (var i = 0; i < attrs.length; i++) {
2729 var scriptAttribute = attrs[i];
2730 if (elt.hasAttribute && elt.hasAttribute(scriptAttribute)) {
2731 return elt.getAttribute(scriptAttribute);
2732 }
2733 }
2734 if (elt instanceof HTMLScriptElement && elt.type === "text/hyperscript") {
2735 return elt.innerText;
2736 }
2737 return null;
2738 }
2739 #scriptSelector;
2740 #getScriptSelector() {
2741 if (!this.#scriptSelector) {

Callers 1

#initElementMethod · 0.95

Calls 1

#getScriptAttributesMethod · 0.95

Tested by

no test coverage detected