HtmlScriptElement Class
https://html.spec.whatwg.org/multipage/scripting.html#htmlscriptelement
public sealed class HtmlScriptElement : HtmlElement- Inheritance
HtmlElementHtmlScriptElement
Properties
| Name | Description |
|---|---|
| Async | https://html.spec.whatwg.org/multipage/scripting.html#dom-script-async |
| Blocking | Gets the tokens of the blocking content attribute. |
| Charset | Gets or sets the value of the charset content attribute. |
| CrossOrigin | Gets or sets the value of the crossorigin content attribute, limited to the known values (the canonical keyword, or the default value). |
| Defer | Gets or sets a value indicating whether the element has the defer content attribute. |
| Event | Gets or sets the value of the event content attribute. |
| FetchPriority | Gets or sets the value of the fetchpriority content attribute, limited to the known values (the canonical keyword, or the default value). |
| HtmlFor | Gets or sets the value of the for content attribute. |
| InnerText | https://w3c.github.io/trusted-types/dist/spec/#the-innerText-idl-attribute: the attribute of HTMLScriptElement hides the one of HTMLElement, which does not apply Trusted Types (the default policy is then applied when the script is prepared). |
| Integrity | Gets or sets the value of the integrity content attribute. |
| NoModule | Gets or sets a value indicating whether the element has the nomodule content attribute. |
| ReferrerPolicy | Gets or sets the value of the referrerpolicy content attribute, limited to the known values (the canonical keyword, or the default value). |
| Src | https://w3c.github.io/trusted-types/dist/spec/#the-src-idl-attribute |
| Text | https://html.spec.whatwg.org/multipage/scripting.html#dom-script-text |
| TextContent | https://w3c.github.io/trusted-types/dist/spec/#the-textContent-idl-attribute: the attribute of HTMLScriptElement hides the one of Node, which does not apply Trusted Types (the default policy is then applied when the script is prepared). |
| Type | Gets or sets the value of the type content attribute. |
Async
EmbeddedContent.cshttps://html.spec.whatwg.org/multipage/scripting.html#dom-script-async
public bool Async { get; set; }Blocking
HtmlElements.g.csGets the tokens of the blocking content attribute.
public DomTokenList Blocking { get; }Property value
See also
Charset
HtmlElements.g.csGets or sets the value of the charset content attribute.
public string Charset { get; set; }CrossOrigin
HtmlElements.g.csGets or sets the value of the crossorigin content attribute, limited to the known values (the canonical keyword, or the default value).
public string? CrossOrigin { get; set; }Property value
See also
Defer
HtmlElements.g.csGets or sets a value indicating whether the element has the defer content attribute.
public bool Defer { get; set; }Event
HtmlElements.g.csGets or sets the value of the event content attribute.
public string Event { get; set; }FetchPriority
HtmlElements.g.csGets or sets the value of the fetchpriority content attribute, limited to the known values (the canonical keyword, or the default value).
public string FetchPriority { get; set; }Property value
See also
HtmlFor
HtmlElements.g.csGets or sets the value of the for content attribute.
public string HtmlFor { get; set; }InnerText
EmbeddedContent.cshttps://w3c.github.io/trusted-types/dist/spec/#the-innerText-idl-attribute: the attribute of HTMLScriptElement hides the one of HTMLElement, which does not apply Trusted Types (the default policy is then applied when the script is prepared).
public new string InnerText { get; set; }Property value
Exceptions
TypeErrorException- Trusted Types are enforced and the default policy did not convert the value.
See also
Integrity
HtmlElements.g.csGets or sets the value of the integrity content attribute.
public string Integrity { get; set; }Property value
See also
NoModule
HtmlElements.g.csGets or sets a value indicating whether the element has the nomodule content attribute.
public bool NoModule { get; set; }ReferrerPolicy
HtmlElements.g.csGets or sets the value of the referrerpolicy content attribute, limited to the known values (the canonical keyword, or the default value).
public string ReferrerPolicy { get; set; }Property value
See also
https://w3c.github.io/trusted-types/dist/spec/#the-src-idl-attribute
public string Src { get; set; }Property value
Exceptions
TypeErrorException- Trusted Types are enforced and the default policy did not convert the value.
See also
https://html.spec.whatwg.org/multipage/scripting.html#dom-script-text
public string Text { get; set; }Property value
Exceptions
TypeErrorException- Trusted Types are enforced and the default policy did not convert the value.
See also
TextContent
EmbeddedContent.cshttps://w3c.github.io/trusted-types/dist/spec/#the-textContent-idl-attribute: the attribute of HTMLScriptElement hides the one of Node, which does not apply Trusted Types (the default policy is then applied when the script is prepared).
public new string? TextContent { get; set; }Property value
Exceptions
TypeErrorException- Trusted Types are enforced and the default policy did not convert the value.
See also
Gets or sets the value of the type content attribute.
public string Type { get; set; }Methods
| Name | Description |
|---|---|
| SetInnerText(TrustedScript) | The innerText setter with a TrustedScript value (https://w3c.github.io/trusted-types/dist/spec/#the-innerText-idl-attribute). |
| SetSrc(TrustedScriptUrl) | The src setter with a TrustedScriptUrl value (https://w3c.github.io/trusted-types/dist/spec/#the-src-idl-attribute). |
| SetText(TrustedScript) | The text setter with a TrustedScript value (https://w3c.github.io/trusted-types/dist/spec/#the-text-idl-attribute). |
| SetTextContent(TrustedScript) | The textContent setter with a TrustedScript value (https://w3c.github.io/trusted-types/dist/spec/#the-textContent-idl-attribute). |
| Supports(string) | https://html.spec.whatwg.org/multipage/scripting.html#dom-script-supports |
SetInnerText(TrustedScript)
EmbeddedContent.csThe innerText setter with a TrustedScript value (https://w3c.github.io/trusted-types/dist/spec/#the-innerText-idl-attribute).
public void SetInnerText(TrustedScript value)SetSrc(TrustedScriptUrl)
EmbeddedContent.csThe src setter with a TrustedScriptUrl value (https://w3c.github.io/trusted-types/dist/spec/#the-src-idl-attribute).
public void SetSrc(TrustedScriptUrl value)SetText(TrustedScript)
EmbeddedContent.csThe text setter with a TrustedScript value (https://w3c.github.io/trusted-types/dist/spec/#the-text-idl-attribute).
public void SetText(TrustedScript value)SetTextContent(TrustedScript)
EmbeddedContent.csThe textContent setter with a TrustedScript value (https://w3c.github.io/trusted-types/dist/spec/#the-textContent-idl-attribute).
public void SetTextContent(TrustedScript value)Supports(string)
EmbeddedContent.cshttps://html.spec.whatwg.org/multipage/scripting.html#dom-script-supports