HtmlScriptElement Class

https://html.spec.whatwg.org/multipage/scripting.html#htmlscriptelement

public sealed class HtmlScriptElement : HtmlElement
Inheritance
HtmlElement HtmlScriptElement

Properties

NameDescription
Asynchttps://html.spec.whatwg.org/multipage/scripting.html#dom-script-async
BlockingGets the tokens of the blocking content attribute.
CharsetGets or sets the value of the charset content attribute.
CrossOriginGets or sets the value of the crossorigin content attribute, limited to the known values (the canonical keyword, or the default value).
DeferGets or sets a value indicating whether the element has the defer content attribute.
EventGets or sets the value of the event content attribute.
FetchPriorityGets or sets the value of the fetchpriority content attribute, limited to the known values (the canonical keyword, or the default value).
HtmlForGets or sets the value of the for content attribute.
InnerTexthttps://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).
IntegrityGets or sets the value of the integrity content attribute.
NoModuleGets or sets a value indicating whether the element has the nomodule content attribute.
ReferrerPolicyGets or sets the value of the referrerpolicy content attribute, limited to the known values (the canonical keyword, or the default value).
Srchttps://w3c.github.io/trusted-types/dist/spec/#the-src-idl-attribute
Texthttps://html.spec.whatwg.org/multipage/scripting.html#dom-script-text
TextContenthttps://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).
TypeGets or sets the value of the type content attribute.

https://html.spec.whatwg.org/multipage/scripting.html#dom-script-async

public bool Async { get; set; }

Gets the tokens of the blocking content attribute.

public DomTokenList Blocking { get; }

Gets or sets the value of the charset content attribute.

public string Charset { get; set; }

Gets 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; }

Gets or sets a value indicating whether the element has the defer content attribute.

public bool Defer { get; set; }

Gets or sets the value of the event content attribute.

public string Event { get; set; }

FetchPriority

HtmlElements.g.cs

Gets 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; }

Gets or sets the value of the for content attribute.

public string HtmlFor { get; set; }

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).

public new string InnerText { get; set; }

Property value

string

Exceptions

TypeErrorException
Trusted Types are enforced and the default policy did not convert the value.

See also

Gets or sets the value of the integrity content attribute.

public string Integrity { get; set; }

Gets or sets a value indicating whether the element has the nomodule content attribute.

public bool NoModule { get; set; }

ReferrerPolicy

HtmlElements.g.cs

Gets 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; }

https://w3c.github.io/trusted-types/dist/spec/#the-src-idl-attribute

public string Src { get; set; }

Property value

string

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

string

Exceptions

TypeErrorException
Trusted Types are enforced and the default policy did not convert the value.

See also

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).

public new string? TextContent { get; set; }

Property value

string?

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

NameDescription
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.cs

The 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.cs

The 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.cs

The 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.cs

The 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.cs

https://html.spec.whatwg.org/multipage/scripting.html#dom-script-supports

public static bool Supports(string type)