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

Method #getScript

www/js/_hyperscript-max.js:2727–2739  ·  view source on GitHub ↗
(elt)

Source from the content-addressed store, hash-verified

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

Callers 1

#initElementMethod · 0.95

Calls 1

#getScriptAttributesMethod · 0.95

Tested by

no test coverage detected