Skip to content

HTMLScriptElement

Generated from idl/html.webidl when the site was built at 7aa23e2.

HTMLScriptElement is an interface in idl/html.webidl, inheriting HTMLElement, exposed in Window. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
<script> and <noscript> Widely available Partial 54% 568 of 1046 subtests pass 7
Subresource integrity Widely available No WPT tests WPT maps no test to it 1
constructor
[HTMLConstructor] constructor();
attribute
attribute USVString src;
int32_t niso_html_script_element_get_src(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_script_element_set_src(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
attribute DOMString type;
int32_t niso_html_script_element_get_type(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_script_element_set_type(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
attribute boolean noModule;
int32_t niso_html_script_element_get_no_module(niso_dom* dom, niso_handle self, bool* out);
int32_t niso_html_script_element_set_no_module(niso_dom* dom, niso_handle self, bool value);
attribute
attribute boolean async;
int32_t niso_html_script_element_get_async(niso_dom* dom, niso_handle self, bool* out);
int32_t niso_html_script_element_set_async(niso_dom* dom, niso_handle self, bool value);
attribute
attribute boolean defer;
int32_t niso_html_script_element_get_defer(niso_dom* dom, niso_handle self, bool* out);
int32_t niso_html_script_element_set_defer(niso_dom* dom, niso_handle self, bool value);
attribute
attribute DOMString? crossOrigin;
int32_t niso_html_script_element_get_cross_origin(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_script_element_set_cross_origin(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
attribute DOMString text;
int32_t niso_html_script_element_get_text(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_script_element_set_text(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute Subresource integrity: No WPT tests
attribute DOMString integrity;
int32_t niso_html_script_element_get_integrity(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_script_element_set_integrity(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
attribute DOMString charset;
int32_t niso_html_script_element_get_charset(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_script_element_set_charset(niso_dom* dom, niso_handle self, const char* value, size_t value_len);

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • attributionSrc (Attribution reporting)
  • blocking (blocking=“render”)
  • fetchPriority (Fetch priority)
  • innerText (<script> and <noscript>)
  • referrerPolicy (Referrer policy)
  • supports_static (<script> and <noscript>)
  • textContent (<script> and <noscript>)