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

Method #getScript

www/js/_hyperscript.js:2728–2740  ·  view source on GitHub ↗
(elt)

Source from the content-addressed store, hash-verified

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

Callers 1

#initElementMethod · 0.95

Calls 1

#getScriptAttributesMethod · 0.95

Tested by

no test coverage detected