Element Class

https://dom.spec.whatwg.org/#interface-element

Inheritance
Node Element
Implements

Properties

NameDescription
ActiveViewTransitionGets the active view transition of the element, or null (https://drafts.csswg.org/css-view-transitions-2/#dom-element-activeviewtransition): the scoped view transition started on the element, or the view transition of the document for the document element.
AriaActiveDescendantElementGets or sets the element whose ID is the value of the aria-activedescendant content attribute.
AriaAtomicGets or sets the value of the aria-atomic content attribute.
AriaAutoCompleteGets or sets the value of the aria-autocomplete content attribute.
AriaBrailleLabelGets or sets the value of the aria-braillelabel content attribute.
AriaBrailleRoleDescriptionGets or sets the value of the aria-brailleroledescription content attribute.
AriaBusyGets or sets the value of the aria-busy content attribute.
AriaCheckedGets or sets the value of the aria-checked content attribute.
AriaColCountGets or sets the value of the aria-colcount content attribute.
AriaColIndexGets or sets the value of the aria-colindex content attribute.
AriaColIndexTextGets or sets the value of the aria-colindextext content attribute.
AriaColSpanGets or sets the value of the aria-colspan content attribute.
AriaControlsElementsGets or sets the elements whose IDs are the values of the aria-controls content attribute.
AriaCurrentGets or sets the value of the aria-current content attribute.
AriaDescribedByElementsGets or sets the elements whose IDs are the values of the aria-describedby content attribute.
AriaDescriptionGets or sets the value of the aria-description content attribute.
AriaDetailsElementsGets or sets the elements whose IDs are the values of the aria-details content attribute.
AriaDisabledGets or sets the value of the aria-disabled content attribute.
AriaErrorMessageElementsGets or sets the elements whose IDs are the values of the aria-errormessage content attribute.
AriaExpandedGets or sets the value of the aria-expanded content attribute.
AriaFlowToElementsGets or sets the elements whose IDs are the values of the aria-flowto content attribute.
AriaHasPopupGets or sets the value of the aria-haspopup content attribute.
AriaHiddenGets or sets the value of the aria-hidden content attribute.
AriaInvalidGets or sets the value of the aria-invalid content attribute.
AriaKeyShortcutsGets or sets the value of the aria-keyshortcuts content attribute.
AriaLabelGets or sets the value of the aria-label content attribute.
AriaLabelledByElementsGets or sets the elements whose IDs are the values of the aria-labelledby content attribute.
AriaLevelGets or sets the value of the aria-level content attribute.
AriaLiveGets or sets the value of the aria-live content attribute.
AriaModalGets or sets the value of the aria-modal content attribute.
AriaMultiLineGets or sets the value of the aria-multiline content attribute.
AriaMultiSelectableGets or sets the value of the aria-multiselectable content attribute.
AriaOrientationGets or sets the value of the aria-orientation content attribute.
AriaOwnsElementsGets or sets the elements whose IDs are the values of the aria-owns content attribute.
AriaPlaceholderGets or sets the value of the aria-placeholder content attribute.
AriaPosInSetGets or sets the value of the aria-posinset content attribute.
AriaPressedGets or sets the value of the aria-pressed content attribute.
AriaReadOnlyGets or sets the value of the aria-readonly content attribute.
AriaRelevantGets or sets the value of the aria-relevant content attribute.
AriaRequiredGets or sets the value of the aria-required content attribute.
AriaRoleDescriptionGets or sets the value of the aria-roledescription content attribute.
AriaRowCountGets or sets the value of the aria-rowcount content attribute.
AriaRowIndexGets or sets the value of the aria-rowindex content attribute.
AriaRowIndexTextGets or sets the value of the aria-rowindextext content attribute.
AriaRowSpanGets or sets the value of the aria-rowspan content attribute.
AriaSelectedGets or sets the value of the aria-selected content attribute.
AriaSetSizeGets or sets the value of the aria-setsize content attribute.
AriaSortGets or sets the value of the aria-sort content attribute.
AriaValueMaxGets or sets the value of the aria-valuemax content attribute.
AriaValueMinGets or sets the value of the aria-valuemin content attribute.
AriaValueNowGets or sets the value of the aria-valuenow content attribute.
AriaValueTextGets or sets the value of the aria-valuetext content attribute.
AssignedSlotGets the slot the element is assigned to, or null when it is not assigned to an open shadow tree slot.
AttributesGets the live map of the attributes of the element.
ChildElementCountGets the number of child elements.
ChildrenGets the live collection of the child elements.
ClassListGets the live token list of the class attribute.
ClassNameGets or sets the value of the class attribute.
ClientHeightGets the height of the padding box without the scrollbar (https://drafts.csswg.org/cssom-view/#dom-element-clientheight): see Element.ClientWidth.
ClientLeftGets the width of the left border and of a scrollbar between the left border and the left padding edge (a vertical scrollbar of a right-to-left box, https://drafts.csswg.org/cssom-view/#dom-element-clientleft), or 0 for an element without box or with an inline box.
ClientTopGets the width of the top border and of a scrollbar between the top border and the top padding edge (https://drafts.csswg.org/cssom-view/#dom-element-clienttop), or 0 for an element without box or with an inline box.
ClientWidthGets the width of the padding box without the scrollbar (https://drafts.csswg.org/cssom-view/#dom-element-clientwidth): the width of the viewport without its scrollbar for the root element (the body element in quirks mode), 0 for an element without box or with an inline box.
ComputedNameThe accessible name of the element (https://w3c.github.io/accname/), as reported by the WebDriver "Get Computed Label" command: aria-labelledby, aria-label, the native text alternatives (label, alt, caption, legend...), the name from content, then the title. The white space is collapsed and trimmed.
ComputedRoleThe computed role of the element (https://w3c.github.io/core-aam/#roleMappingComputedRole), as reported by the WebDriver "Get Computed Role" command: the first valid token of the role attribute, or the implicit role of HTML-AAM and SVG-AAM (e.g. "button", "heading", "generic", "none"). The empty string means that the element has no role. An element that is not rendered because of display: none (on it or on an ancestor) is not in the accessibility tree: its computed role is "none", as in the browsers.
CurrentCssZoomGets the effective zoom of the element (https://drafts.csswg.org/cssom-view/#dom-element-currentcsszoom), or 1 when it is not being rendered.
CustomElementRegistryhttps://dom.spec.whatwg.org/#element-custom-element-registry. Most elements use the registry of their node document, which is not stored in each element: only the other registries (scoped registries) are stored in the rare data.
ElementTimingGets or sets the elementtiming attribute: the identifier of the element timing entries of the element (https://w3c.github.io/element-timing/#sec-elements-exposed).
FirstElementChildGets the first child that is an element, or null when there is none.
IdGets or sets the value of the id attribute.
InnerHtmlhttps://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-innerhtml
LastElementChildGets the last child that is an element, or null when there is none.
LocalNameGets the local name of the element.
NamespaceUriGets the namespace of the element, or null when it has none.
NextElementSiblingGets the closest following sibling that is an element, or null when there is none.
NodeNameGets the node name of the element, which is its tag name.
NodeTypeGets the node type of an element, which is 1 (ELEMENT_NODE).
OnFullscreenChangeGets or sets the event handler of the fullscreenchange event (the onfullscreenchange event handler attribute).
OnFullscreenErrorGets or sets the event handler of the fullscreenerror event (the onfullscreenerror event handler attribute).
OuterHtmlhttps://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-outerhtml
PartThe part names of the element (the part attribute, https://drafts.csswg.org/css-shadow-1/#part-attr): an element of a shadow tree with a part name can be styled from outside the tree with ::part().
PrefixGets the namespace prefix of the element, or null when it has none.
PreviousElementSiblingGets the closest preceding sibling that is an element, or null when there is none.
RoleGets or sets the value of the role content attribute.
ScrollHeightGets the height of the scrolling area (https://drafts.csswg.org/cssom-view/#dom-element-scrollheight): see Element.ScrollWidth.
ScrollLeftGets or sets the horizontal scroll position (https://drafts.csswg.org/cssom-view/#dom-element-scrollleft): see Element.ScrollTop. It is negative when the content overflows leftwards (direction: rtl, vertical-rl).
ScrollTopGets or sets the vertical scroll position (https://drafts.csswg.org/cssom-view/#dom-element-scrolltop): the scroll position of the viewport for the root element (and the body element in quirks mode), the one of the scrolling box of the element, else 0. It is negative when the content overflows upwards (e.g. flex-direction: column-reverse).
ScrollWidthGets the width of the scrolling area (https://drafts.csswg.org/cssom-view/#dom-element-scrollwidth): the scrolling area of the viewport for the root element (the body element in quirks mode), at least the width of the viewport without its scrollbar; else the width of the scrolling area of the box (its padding box and its scrollable overflow).
ShadowRootGets the open shadow root of the element, or null when it has none or it is closed.
SlotGets or sets the value of the slot attribute.
TagNamehttps://dom.spec.whatwg.org/#element-html-uppercased-qualified-name
TextContentGets or sets the concatenation of the text of the descendant text nodes; setting it replaces all the children.

ActiveViewTransition

Element.ViewTransitions.cs

Gets the active view transition of the element, or null (https://drafts.csswg.org/css-view-transitions-2/#dom-element-activeviewtransition): the scoped view transition started on the element, or the view transition of the document for the document element.

public ViewTransition? ActiveViewTransition { get; }

AriaActiveDescendantElement

Element.g.cs

Gets or sets the element whose ID is the value of the aria-activedescendant content attribute.

public Element? AriaActiveDescendantElement { get; set; }

AriaAtomic

Element.g.cs

Gets or sets the value of the aria-atomic content attribute.

public string? AriaAtomic { get; set; }

AriaAutoComplete

Element.g.cs

Gets or sets the value of the aria-autocomplete content attribute.

public string? AriaAutoComplete { get; set; }

AriaBrailleLabel

Element.g.cs

Gets or sets the value of the aria-braillelabel content attribute.

public string? AriaBrailleLabel { get; set; }

AriaBrailleRoleDescription

Element.g.cs

Gets or sets the value of the aria-brailleroledescription content attribute.

public string? AriaBrailleRoleDescription { get; set; }

AriaBusy

Element.g.cs

Gets or sets the value of the aria-busy content attribute.

public string? AriaBusy { get; set; }

AriaChecked

Element.g.cs

Gets or sets the value of the aria-checked content attribute.

public string? AriaChecked { get; set; }

AriaColCount

Element.g.cs

Gets or sets the value of the aria-colcount content attribute.

public string? AriaColCount { get; set; }

AriaColIndex

Element.g.cs

Gets or sets the value of the aria-colindex content attribute.

public string? AriaColIndex { get; set; }

AriaColIndexText

Element.g.cs

Gets or sets the value of the aria-colindextext content attribute.

public string? AriaColIndexText { get; set; }

AriaColSpan

Element.g.cs

Gets or sets the value of the aria-colspan content attribute.

public string? AriaColSpan { get; set; }

AriaControlsElements

Element.g.cs

Gets or sets the elements whose IDs are the values of the aria-controls content attribute.

public IReadOnlyList<Element>? AriaControlsElements { get; set; }

AriaCurrent

Element.g.cs

Gets or sets the value of the aria-current content attribute.

public string? AriaCurrent { get; set; }

AriaDescribedByElements

Element.g.cs

Gets or sets the elements whose IDs are the values of the aria-describedby content attribute.

public IReadOnlyList<Element>? AriaDescribedByElements { get; set; }

AriaDescription

Element.g.cs

Gets or sets the value of the aria-description content attribute.

public string? AriaDescription { get; set; }

AriaDetailsElements

Element.g.cs

Gets or sets the elements whose IDs are the values of the aria-details content attribute.

public IReadOnlyList<Element>? AriaDetailsElements { get; set; }

AriaDisabled

Element.g.cs

Gets or sets the value of the aria-disabled content attribute.

public string? AriaDisabled { get; set; }

AriaErrorMessageElements

Element.g.cs

Gets or sets the elements whose IDs are the values of the aria-errormessage content attribute.

public IReadOnlyList<Element>? AriaErrorMessageElements { get; set; }

AriaExpanded

Element.g.cs

Gets or sets the value of the aria-expanded content attribute.

public string? AriaExpanded { get; set; }

AriaFlowToElements

Element.g.cs

Gets or sets the elements whose IDs are the values of the aria-flowto content attribute.

public IReadOnlyList<Element>? AriaFlowToElements { get; set; }

AriaHasPopup

Element.g.cs

Gets or sets the value of the aria-haspopup content attribute.

public string? AriaHasPopup { get; set; }

AriaHidden

Element.g.cs

Gets or sets the value of the aria-hidden content attribute.

public string? AriaHidden { get; set; }

AriaInvalid

Element.g.cs

Gets or sets the value of the aria-invalid content attribute.

public string? AriaInvalid { get; set; }

AriaKeyShortcuts

Element.g.cs

Gets or sets the value of the aria-keyshortcuts content attribute.

public string? AriaKeyShortcuts { get; set; }

AriaLabel

Element.g.cs

Gets or sets the value of the aria-label content attribute.

public string? AriaLabel { get; set; }

AriaLabelledByElements

Element.g.cs

Gets or sets the elements whose IDs are the values of the aria-labelledby content attribute.

public IReadOnlyList<Element>? AriaLabelledByElements { get; set; }

AriaLevel

Element.g.cs

Gets or sets the value of the aria-level content attribute.

public string? AriaLevel { get; set; }

AriaLive

Element.g.cs

Gets or sets the value of the aria-live content attribute.

public string? AriaLive { get; set; }

AriaModal

Element.g.cs

Gets or sets the value of the aria-modal content attribute.

public string? AriaModal { get; set; }

AriaMultiLine

Element.g.cs

Gets or sets the value of the aria-multiline content attribute.

public string? AriaMultiLine { get; set; }

AriaMultiSelectable

Element.g.cs

Gets or sets the value of the aria-multiselectable content attribute.

public string? AriaMultiSelectable { get; set; }

AriaOrientation

Element.g.cs

Gets or sets the value of the aria-orientation content attribute.

public string? AriaOrientation { get; set; }

AriaOwnsElements

Element.g.cs

Gets or sets the elements whose IDs are the values of the aria-owns content attribute.

public IReadOnlyList<Element>? AriaOwnsElements { get; set; }

AriaPlaceholder

Element.g.cs

Gets or sets the value of the aria-placeholder content attribute.

public string? AriaPlaceholder { get; set; }

AriaPosInSet

Element.g.cs

Gets or sets the value of the aria-posinset content attribute.

public string? AriaPosInSet { get; set; }

AriaPressed

Element.g.cs

Gets or sets the value of the aria-pressed content attribute.

public string? AriaPressed { get; set; }

AriaReadOnly

Element.g.cs

Gets or sets the value of the aria-readonly content attribute.

public string? AriaReadOnly { get; set; }

AriaRelevant

Element.g.cs

Gets or sets the value of the aria-relevant content attribute.

public string? AriaRelevant { get; set; }

AriaRequired

Element.g.cs

Gets or sets the value of the aria-required content attribute.

public string? AriaRequired { get; set; }

AriaRoleDescription

Element.g.cs

Gets or sets the value of the aria-roledescription content attribute.

public string? AriaRoleDescription { get; set; }

AriaRowCount

Element.g.cs

Gets or sets the value of the aria-rowcount content attribute.

public string? AriaRowCount { get; set; }

AriaRowIndex

Element.g.cs

Gets or sets the value of the aria-rowindex content attribute.

public string? AriaRowIndex { get; set; }

AriaRowIndexText

Element.g.cs

Gets or sets the value of the aria-rowindextext content attribute.

public string? AriaRowIndexText { get; set; }

AriaRowSpan

Element.g.cs

Gets or sets the value of the aria-rowspan content attribute.

public string? AriaRowSpan { get; set; }

AriaSelected

Element.g.cs

Gets or sets the value of the aria-selected content attribute.

public string? AriaSelected { get; set; }

AriaSetSize

Element.g.cs

Gets or sets the value of the aria-setsize content attribute.

public string? AriaSetSize { get; set; }

AriaSort

Element.g.cs

Gets or sets the value of the aria-sort content attribute.

public string? AriaSort { get; set; }

AriaValueMax

Element.g.cs

Gets or sets the value of the aria-valuemax content attribute.

public string? AriaValueMax { get; set; }

AriaValueMin

Element.g.cs

Gets or sets the value of the aria-valuemin content attribute.

public string? AriaValueMin { get; set; }

AriaValueNow

Element.g.cs

Gets or sets the value of the aria-valuenow content attribute.

public string? AriaValueNow { get; set; }

AriaValueText

Element.g.cs

Gets or sets the value of the aria-valuetext content attribute.

public string? AriaValueText { get; set; }

AssignedSlot

Element.cs

Gets the slot the element is assigned to, or null when it is not assigned to an open shadow tree slot.

public HtmlSlotElement? AssignedSlot { get; }

Gets the live map of the attributes of the element.

public NamedNodeMap Attributes { get; }

ChildElementCount

Mixins.Members.cs

Gets the number of child elements.

public uint ChildElementCount { get; }

Gets the live collection of the child elements.

public HtmlCollection Children { get; }

Gets the live token list of the class attribute.

public DomTokenList ClassList { get; }

ClassName

Element.cs

Gets or sets the value of the class attribute.

public string ClassName { get; set; }

Gets the height of the padding box without the scrollbar (https://drafts.csswg.org/cssom-view/#dom-element-clientheight): see Element.ClientWidth.

public int ClientHeight { get; }

Gets the width of the left border and of a scrollbar between the left border and the left padding edge (a vertical scrollbar of a right-to-left box, https://drafts.csswg.org/cssom-view/#dom-element-clientleft), or 0 for an element without box or with an inline box.

public int ClientLeft { get; }

Gets the width of the top border and of a scrollbar between the top border and the top padding edge (https://drafts.csswg.org/cssom-view/#dom-element-clienttop), or 0 for an element without box or with an inline box.

public int ClientTop { get; }

Gets the width of the padding box without the scrollbar (https://drafts.csswg.org/cssom-view/#dom-element-clientwidth): the width of the viewport without its scrollbar for the root element (the body element in quirks mode), 0 for an element without box or with an inline box.

public int ClientWidth { get; }

The accessible name of the element (https://w3c.github.io/accname/), as reported by the WebDriver "Get Computed Label" command: aria-labelledby, aria-label, the native text alternatives (label, alt, caption, legend...), the name from content, then the title. The white space is collapsed and trimmed.

public string ComputedName { get; }

Property value

string

The computed role of the element (https://w3c.github.io/core-aam/#roleMappingComputedRole), as reported by the WebDriver "Get Computed Role" command: the first valid token of the role attribute, or the implicit role of HTML-AAM and SVG-AAM (e.g. "button", "heading", "generic", "none"). The empty string means that the element has no role. An element that is not rendered because of display: none (on it or on an ancestor) is not in the accessibility tree: its computed role is "none", as in the browsers.

public string ComputedRole { get; }

Property value

string

Gets the effective zoom of the element (https://drafts.csswg.org/cssom-view/#dom-element-currentcsszoom), or 1 when it is not being rendered.

public double CurrentCssZoom { get; }

CustomElementRegistry

Element.cs

https://dom.spec.whatwg.org/#element-custom-element-registry. Most elements use the registry of their node document, which is not stored in each element: only the other registries (scoped registries) are stored in the rare data.

public CustomElementRegistry? CustomElementRegistry { get; }

ElementTiming

Element.cs

Gets or sets the elementtiming attribute: the identifier of the element timing entries of the element (https://w3c.github.io/element-timing/#sec-elements-exposed).

public string ElementTiming { get; set; }

FirstElementChild

Mixins.Members.cs

Gets the first child that is an element, or null when there is none.

public Element? FirstElementChild { get; }

Gets or sets the value of the id attribute.

public string Id { get; set; }

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-innerhtml

public string InnerHtml { get; set; }

Property value

string

Exceptions

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

See also

LastElementChild

Mixins.Members.cs

Gets the last child that is an element, or null when there is none.

public Element? LastElementChild { get; }

LocalName

Element.cs

Gets the local name of the element.

public string LocalName { get; }

NamespaceUri

Element.cs

Gets the namespace of the element, or null when it has none.

public string? NamespaceUri { get; }

NextElementSibling

Mixins.Members.cs

Gets the closest following sibling that is an element, or null when there is none.

public Element? NextElementSibling { get; }

NodeName

Element.cs

Gets the node name of the element, which is its tag name.

public override string NodeName { get; }

Property value

string

NodeType

Element.cs

Gets the node type of an element, which is 1 (ELEMENT_NODE).

public override ushort NodeType { get; }

Property value

ushort

OnFullscreenChange

Element.g.cs

Gets or sets the event handler of the fullscreenchange event (the onfullscreenchange event handler attribute).

public Action<Event>? OnFullscreenChange { get; set; }

OnFullscreenError

Element.g.cs

Gets or sets the event handler of the fullscreenerror event (the onfullscreenerror event handler attribute).

public Action<Event>? OnFullscreenError { get; set; }

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-outerhtml

public string OuterHtml { get; set; }

The part names of the element (the part attribute, https://drafts.csswg.org/css-shadow-1/#part-attr): an element of a shadow tree with a part name can be styled from outside the tree with ::part().

public DomTokenList Part { get; }

Gets the namespace prefix of the element, or null when it has none.

public string? Prefix { get; }

PreviousElementSibling

Mixins.Members.cs

Gets the closest preceding sibling that is an element, or null when there is none.

public Element? PreviousElementSibling { get; }

Gets or sets the value of the role content attribute.

public string? Role { get; set; }

Gets the height of the scrolling area (https://drafts.csswg.org/cssom-view/#dom-element-scrollheight): see Element.ScrollWidth.

public int ScrollHeight { get; }

Gets or sets the horizontal scroll position (https://drafts.csswg.org/cssom-view/#dom-element-scrollleft): see Element.ScrollTop. It is negative when the content overflows leftwards (direction: rtl, vertical-rl).

public double ScrollLeft { get; set; }

Gets or sets the vertical scroll position (https://drafts.csswg.org/cssom-view/#dom-element-scrolltop): the scroll position of the viewport for the root element (and the body element in quirks mode), the one of the scrolling box of the element, else 0. It is negative when the content overflows upwards (e.g. flex-direction: column-reverse).

public double ScrollTop { get; set; }

Gets the width of the scrolling area (https://drafts.csswg.org/cssom-view/#dom-element-scrollwidth): the scrolling area of the viewport for the root element (the body element in quirks mode), at least the width of the viewport without its scrollbar; else the width of the scrolling area of the box (its padding box and its scrollable overflow).

public int ScrollWidth { get; }

ShadowRoot

Element.cs

Gets the open shadow root of the element, or null when it has none or it is closed.

public ShadowRoot? ShadowRoot { get; }

Gets or sets the value of the slot attribute.

public string Slot { get; set; }

TagName

Element.cs

https://dom.spec.whatwg.org/#element-html-uppercased-qualified-name

public string TagName { get; }

TextContent

Element.cs

Gets or sets the concatenation of the text of the descendant text nodes; setting it replaces all the children.

public override string? TextContent { get; set; }

Property value

string?

Methods

NameDescription
After(ReadOnlySpan<NodeOrString>)Inserts the nodes just after this node, converting the strings into text nodes.
AfterHtml(string, SetHtmlOptions?)Parses the HTML and inserts the result after this node.
AfterHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and inserts the result after this node, without the default sanitizer.
AfterHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and inserts the result after this node, without the default sanitizer.
Animate(IEnumerable<Keyframe>?, KeyframeAnimationOptions?)Creates an animation of the element with the keyframes and plays it (https://drafts.csswg.org/web-animations-1/#dom-animatable-animate).
Animate(IEnumerable<Keyframe>?, double)Creates an animation of the element with the keyframes, whose duration is duration milliseconds, and plays it (https://drafts.csswg.org/web-animations-1/#dom-animatable-animate).
Append(ReadOnlySpan<NodeOrString>)Inserts the nodes after the last child, converting the strings into text nodes.
AppendHtml(string, SetHtmlOptions?)Parses the HTML and inserts the result after the last child.
AppendHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and inserts the result after the last child, without the default sanitizer.
AppendHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and inserts the result after the last child, without the default sanitizer.
AttachShadow(ShadowRootInit)https://dom.spec.whatwg.org/#dom-element-attachshadow
Before(ReadOnlySpan<NodeOrString>)Inserts the nodes just before this node, converting the strings into text nodes.
BeforeHtml(string, SetHtmlOptions?)Parses the HTML and inserts the result before this node.
BeforeHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and inserts the result before this node, without the default sanitizer.
BeforeHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and inserts the result before this node, without the default sanitizer.
CaptureAccessibilityTree()Captures the accessibility tree rooted at the element: a snapshot that does not follow the later changes of the document, in the format of the aria snapshots of Playwright (AccessibilityNode.ToAriaSnapshot). The hidden subtrees are excluded; the elements without a role, the presentational elements and the generic elements are replaced by their children. Returns null when the element is hidden.
CheckVisibility(CheckVisibilityOptions?)Returns whether the element is visible (https://drafts.csswg.org/cssom-view/#dom-element-checkvisibility): it is being rendered, no flat tree ancestor has content-visibility: hidden and, depending on the options, it is not transparent (opacity: 0) or invisible (visibility).
Closest(SelectorList)Returns the closest inclusive ancestor that matches the parsed selector (https://dom.spec.whatwg.org/#dom-element-closest).
Closest(string)https://dom.spec.whatwg.org/#dom-element-closest
ComputedStyleMap()Returns the computed values of the element as CssStyleValue objects (https://drafts.css-houdini.org/css-typed-om-1/#dom-element-computedstylemap). The map is live; it is empty when the element is not rendered (e.g. not connected).
ConvertPointFromNode(DomPointInit, GeometryNode, ConvertCoordinateOptions?)Converts a point from the coordinates of a node to the coordinates of the element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertpointfromnode).
ConvertQuadFromNode(DomQuadInit, GeometryNode, ConvertCoordinateOptions?)Converts a quad from the coordinates of a node to the coordinates of the element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertquadfromnode).
ConvertRectFromNode(DomRectReadOnly, GeometryNode, ConvertCoordinateOptions?)Converts a rectangle from the coordinates of a node to the coordinates of the element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertrectfromnode).
GetAccessibilityProperties()Returns the properties that the accessibility tree exposes for the element: its role, its accessible name and description, and its states (checked, pressed, expanded, selected, disabled, level). The values are computed when the method is called; use Element.CaptureAccessibilityTree for the whole subtree.
GetAnimations(GetAnimationsOptions?)Returns the relevant animations of the element (or of one of its pseudo-elements, or of its subtree), sorted by their composite order (https://drafts.csswg.org/web-animations-1/#dom-animatable-getanimations).
GetAttribute(string)Returns the value of the attribute with the given qualified name, or null when there is none.
GetAttributeNS(string?, string)Returns the value of the attribute with the given namespace and local name, or null when there is none.
GetAttributeNames()Returns the qualified names of the attributes of the element.
GetAttributeNode(string)Returns the attribute node with the given qualified name, or null when there is none.
GetAttributeNodeNS(string?, string)Returns the attribute node with the given namespace and local name, or null when there is none.
GetBoundingClientRect()Returns the bounding box of the boxes of the element (https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect), in the coordinates of the viewport: the union of the rectangles of Element.GetClientRects (ignoring the empty ones, unless they all are), a zero rectangle when the element has no box.
GetBoxQuads(BoxQuadOptions?)Returns the quads of the boxes of the element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-getboxquads): one per box fragment (or the bounding box of an element of an SVG document fragment), with the transforms, in the coordinates of the viewport or of BoxQuadOptions.RelativeTo.
GetClientRects()Returns the boxes of the element (https://drafts.csswg.org/cssom-view/#dom-element-getclientrects), in the coordinates of the viewport: the border box of each fragment of its principal box (e.g. one per line for an inline box split over several lines; the table box and the caption boxes of a table), or the bounding box of an element of an SVG document fragment, with the transforms of the element and of its ancestors applied (the bounding box of the transformed box). The list is empty when the element has no box (it is not connected, it or one of its ancestors has display: none, display: contents, or its document has no browsing context).
GetElementsByClassName(string)Returns a live collection of the descendant elements that have all the given class names.
GetElementsByTagName(string)Returns a live collection of the descendant elements with the given qualified name.
GetElementsByTagNameNS(string?, string)Returns a live collection of the descendant elements with the given namespace and local name.
GetHtml(GetHtmlOptions?)https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-gethtml
HasAttribute(string)Returns a value indicating whether the element has an attribute with the given qualified name.
HasAttributeNS(string?, string)Returns a value indicating whether the element has an attribute with the given namespace and local name.
HasAttributes()Returns a value indicating whether the element has at least one attribute.
HasPointerCapture(int)Returns whether the element captures (or is about to capture) a pointer (https://w3c.github.io/pointerevents/#dom-element-haspointercapture).
InsertAdjacentElement(string, Element)Inserts the element at the given position relative to this element and returns it, or null when it cannot be inserted.
InsertAdjacentHtml(string, TrustedHtml)https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-insertadjacenthtml
InsertAdjacentHtml(string, string)https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-insertadjacenthtml
InsertAdjacentText(string, string)Inserts a text node with the given data at the given position relative to this element.
MatchContainer(string)Returns a ContainerQueryList that evaluates a comma-separated list of container conditions for the element (https://github.com/w3c/csswg-drafts/pull/13551, a tentative extension of CSS Conditional 5).
Matches(SelectorList)Returns whether the element matches the parsed selector (https://dom.spec.whatwg.org/#dom-element-matches).
Matches(string)https://dom.spec.whatwg.org/#dom-element-matches
MoveBefore(Node, Node?)Moves the node, preserving its state, before the given child (or to the end when the child is null).
Prepend(ReadOnlySpan<NodeOrString>)Inserts the nodes before the first child, converting the strings into text nodes.
PrependHtml(string, SetHtmlOptions?)Parses the HTML and inserts the result before the first child.
PrependHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and inserts the result before the first child, without the default sanitizer.
PrependHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and inserts the result before the first child, without the default sanitizer.
Pseudo(string)Returns the pseudo-element of the element designated by a pseudo-element selector (e.g. "::before"), or null when the selector is invalid or does not designate a tree-abiding pseudo-element that is not element-backed (https://drafts.csswg.org/css-pseudo-4/#dom-element-pseudo). The pseudo-element is returned even when it is not generated, and the same object is returned for the same pseudo-element.
QuerySelector(SelectorList)Returns the first descendant element, in tree order, that matches the parsed selector list, or null.
QuerySelector(string)Returns the first descendant element, in tree order, that matches the selectors, or null.
QuerySelector<T>(SelectorList)Returns the first descendant, in tree order, that is a T and matches the parsed selector.
QuerySelector<T>(string)Returns the first descendant, in tree order, that is a T and matches the selector.
QuerySelectorAll(SelectorList)Returns the descendant elements, in tree order, that match the parsed selector list.
QuerySelectorAll(string)Returns the descendant elements, in tree order, that match the selectors.
QuerySelectorAll<T>(SelectorList)Returns the descendants, in tree order, that are a T and match the parsed selector.
QuerySelectorAll<T>(string)Returns the descendants, in tree order, that are a T and match the selector.
ReleasePointerCapture(int)Releases the pointer capture of a pointer when the element captures it (https://w3c.github.io/pointerevents/#dom-element-releasepointercapture).
Remove()Removes this node from its parent, if any.
RemoveAttribute(string)Removes the attribute with the given qualified name, if any.
RemoveAttributeNS(string?, string)Removes the attribute with the given namespace and local name, if any.
RemoveAttributeNode(Attr)Removes the attribute node from the element and returns it.
ReplaceChildren(ReadOnlySpan<NodeOrString>)Replaces all the children with the given nodes, converting the strings into text nodes.
ReplaceWith(ReadOnlySpan<NodeOrString>)Replaces this node with the given nodes in its parent, converting the strings into text nodes.
ReplaceWithHtml(string, SetHtmlOptions?)Parses the HTML and replaces this node with the result.
ReplaceWithHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and replaces this node with the result, without the default sanitizer.
ReplaceWithHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Parses the HTML and replaces this node with the result, without the default sanitizer.
RequestFullscreen(FullscreenOptions?)Displays the element fullscreen (https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen): the element and the containers of the ancestor navigables are added to the top layer of their document, and fullscreenchange is fired at them by the next rendering update. The window must have transient activation. The task fails with a TypeErrorException when the element cannot be displayed fullscreen (fullscreenerror is fired).
RequestPointerLock(PointerLockOptions?)Locks the mouse of the user to the element (https://w3c.github.io/pointerlock/#dom-element-requestpointerlock): its events are then fired at the element, with the position of the pointer when the lock was entered and the movements of the device (MouseEvent.MovementX, MouseEvent.MovementY), until the lock is exited. The window must have transient activation, unless the document released a pointer lock with Document.ExitPointerLock. The pointer is locked by a task, which fires pointerlockchange at the document; the task fails with a DomException when the pointer cannot be locked (pointerlockerror is fired).
Scroll(ScrollToOptions?)Scrolls the element (https://drafts.csswg.org/cssom-view/#dom-element-scroll) to the scroll position of ScrollToOptions.Left and ScrollToOptions.Top (the current ones when they are absent): the viewport for the root element (and the body element in quirks mode), else its scrolling box. The task completes when the scroll is completed.
Scroll(double, double)Scrolls the element to a scroll position (https://drafts.csswg.org/cssom-view/#dom-element-scroll): see Element.Scroll.
ScrollBy(ScrollToOptions?)Scrolls the element by an offset (https://drafts.csswg.org/cssom-view/#dom-element-scrollby): the offsets are added to Element.ScrollLeft and Element.ScrollTop. A scroll snap container snaps in the direction of the scroll (a relative scroll, https://drafts.csswg.org/css-scroll-snap-1/#relative-scroll).
ScrollBy(double, double)Scrolls the element by an offset (https://drafts.csswg.org/cssom-view/#dom-element-scrollby): see Element.ScrollBy.
ScrollIntoView()Scrolls the element into view (https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview), aligning its top with the top of its scrolling boxes.
ScrollIntoView(ScrollIntoViewOptions?)Scrolls the element into view (https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview): its scrolling boxes, from the innermost to the outermost (or only the nearest one with container: "nearest"), are scrolled to align it as given by the options, with its scroll-margin and their scroll-padding. The task completes when the scrolls are completed.
ScrollIntoView(bool)Scrolls the element into view (https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview): its block-start edge is aligned with the block-start edge of its scrolling boxes when alignToTop is true, its block-end edge with their block-end edge otherwise.
ScrollTo(ScrollToOptions?)Scrolls the element (https://drafts.csswg.org/cssom-view/#dom-element-scrollto): see Element.Scroll.
ScrollTo(double, double)Scrolls the element (https://drafts.csswg.org/cssom-view/#dom-element-scrollto): see Element.Scroll.
SetAttribute(string, TrustedType)https://dom.spec.whatwg.org/#dom-element-setattribute
SetAttribute(string, string)https://dom.spec.whatwg.org/#dom-element-setattribute
SetAttributeNS(string?, string, TrustedType)https://dom.spec.whatwg.org/#dom-element-setattributens
SetAttributeNS(string?, string, string)https://dom.spec.whatwg.org/#dom-element-setattributens
SetAttributeNode(Attr)Adds the attribute node to the element and returns the attribute node it replaced, or null.
SetAttributeNodeNS(Attr)Adds the attribute node to the element and returns the attribute node it replaced, or null.
SetHtml(string, SetHtmlOptions?)https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-sethtml
SetHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-sethtmlunsafe
SetHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-sethtmlunsafe
SetInnerHtml(TrustedHtml)The innerHTML setter with a TrustedHtml value (https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-innerhtml).
SetOuterHtml(TrustedHtml)The outerHTML setter with a TrustedHtml value (https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-outerhtml).
SetPointerCapture(int)Sets the pointer capture of an active pointer to the element (https://w3c.github.io/pointerevents/#dom-element-setpointercapture): its subsequent events are fired at the element until the capture is released. The pointer must be in the active buttons state.
StartViewTransition(StartViewTransitionOptions?)Starts a view transition whose root element is the element, with options (https://drafts.csswg.org/css-view-transitions-2/#dom-element-startviewtransition): the update callback and the types of the transition.
StartViewTransition(ViewTransitionUpdateCallback)Starts a view transition whose root element is the element (https://drafts.csswg.org/css-view-transitions-2/#dom-element-startviewtransition): the old state of the element and of its subtree is captured at the next rendering opportunity, then the callback updates the document, and the transition between the two states is animated by a tree of pseudo-elements that originate from the element and are painted above its contents. The active view transition of the element, if any, is skipped. On the document element, it is the same as Document.StartViewTransition.
StreamAfterHtml(SetHtmlOptions?)Returns a writer that parses HTML and inserts the result after this node as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).
StreamAfterHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Returns a writer that parses HTML and inserts the result after this node as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).
StreamAppendHtml(SetHtmlOptions?)Returns a writer that parses HTML and inserts the result after the last child as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).
StreamAppendHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Returns a writer that parses HTML and inserts the result after the last child as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).
StreamBeforeHtml(SetHtmlOptions?)Returns a writer that parses HTML and inserts the result before this node as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).
StreamBeforeHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Returns a writer that parses HTML and inserts the result before this node as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).
StreamHtml(SetHtmlOptions?)Returns a writer that parses HTML and replaces the children with the result as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).
StreamHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Returns a writer that parses HTML and replaces the children with the result as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).
StreamPrependHtml(SetHtmlOptions?)Returns a writer that parses HTML and inserts the result before the first child as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).
StreamPrependHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Returns a writer that parses HTML and inserts the result before the first child as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).
StreamReplaceWithHtml(SetHtmlOptions?)Returns a writer that parses HTML and replaces this node with the result as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).
StreamReplaceWithHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)Returns a writer that parses HTML and replaces this node with the result as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).
ToggleAttribute(string, bool?)https://dom.spec.whatwg.org/#dom-element-toggleattribute
WebkitMatchesSelector(string)https://dom.spec.whatwg.org/#dom-element-webkitmatchesselector

After(ReadOnlySpan<NodeOrString>)

Mixins.Members.cs

Inserts the nodes just after this node, converting the strings into text nodes.

public void After(params scoped ReadOnlySpan<NodeOrString> nodes)

AfterHtml(string, SetHtmlOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result after this node.

public void AfterHtml(string html, SetHtmlOptions? options = null)

AfterHtmlUnsafe overloads

AfterHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result after this node, without the default sanitizer.

public void AfterHtmlUnsafe(TrustedHtml html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

AfterHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result after this node, without the default sanitizer.

public void AfterHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

Animate overloads

Animate(IEnumerable<Keyframe>?, KeyframeAnimationOptions?)

Element.Animations.cs

Creates an animation of the element with the keyframes and plays it (https://drafts.csswg.org/web-animations-1/#dom-animatable-animate).

public Animation Animate(IEnumerable<Keyframe>? keyframes, KeyframeAnimationOptions? options = null)
Parameters
keyframes IEnumerable<Keyframe>?
options KeyframeAnimationOptions?
Returns

Animation

Exceptions
TypeErrorException
The keyframes or the timing properties are invalid.
DomException
The pseudo-element is invalid (SyntaxError).
See also

Animate(IEnumerable<Keyframe>?, double)

Element.Animations.cs

Creates an animation of the element with the keyframes, whose duration is duration milliseconds, and plays it (https://drafts.csswg.org/web-animations-1/#dom-animatable-animate).

public Animation Animate(IEnumerable<Keyframe>? keyframes, double duration)
Parameters
keyframes IEnumerable<Keyframe>?
duration double
Returns

Animation

Exceptions
TypeErrorException
The keyframes or the duration are invalid.
See also

Append(ReadOnlySpan<NodeOrString>)

Mixins.Members.cs

Inserts the nodes after the last child, converting the strings into text nodes.

public void Append(params scoped ReadOnlySpan<NodeOrString> nodes)

AppendHtml(string, SetHtmlOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result after the last child.

public void AppendHtml(string html, SetHtmlOptions? options = null)

AppendHtmlUnsafe overloads

AppendHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result after the last child, without the default sanitizer.

public void AppendHtmlUnsafe(TrustedHtml html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

AppendHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result after the last child, without the default sanitizer.

public void AppendHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)
Parameters
html string
options SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?
Exceptions
TypeErrorException
Trusted Types are enforced and the options or the value are not trusted.
See also

AttachShadow(ShadowRootInit)

Element.cs

https://dom.spec.whatwg.org/#dom-element-attachshadow

public ShadowRoot AttachShadow(ShadowRootInit init)

Before(ReadOnlySpan<NodeOrString>)

Mixins.Members.cs

Inserts the nodes just before this node, converting the strings into text nodes.

public void Before(params scoped ReadOnlySpan<NodeOrString> nodes)

BeforeHtml(string, SetHtmlOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result before this node.

public void BeforeHtml(string html, SetHtmlOptions? options = null)

BeforeHtmlUnsafe overloads

BeforeHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result before this node, without the default sanitizer.

public void BeforeHtmlUnsafe(TrustedHtml html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

BeforeHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result before this node, without the default sanitizer.

public void BeforeHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

CaptureAccessibilityTree()

Element.Accessibility.cs

Captures the accessibility tree rooted at the element: a snapshot that does not follow the later changes of the document, in the format of the aria snapshots of Playwright (AccessibilityNode.ToAriaSnapshot). The hidden subtrees are excluded; the elements without a role, the presentational elements and the generic elements are replaced by their children. Returns null when the element is hidden.

public AccessibilityNode? CaptureAccessibilityTree()

CheckVisibility(CheckVisibilityOptions?)

CssomView.Scrolling.cs

Returns whether the element is visible (https://drafts.csswg.org/cssom-view/#dom-element-checkvisibility): it is being rendered, no flat tree ancestor has content-visibility: hidden and, depending on the options, it is not transparent (opacity: 0) or invisible (visibility).

public bool CheckVisibility(CheckVisibilityOptions? options = null)

Closest overloads

Closest(SelectorList)

Element.Collections.cs

Returns the closest inclusive ancestor that matches the parsed selector (https://dom.spec.whatwg.org/#dom-element-closest).

public Element? Closest(SelectorList selectors)
Parameters
selectors SelectorList
Returns

Element?

Closest(string)

Element.Collections.cs

https://dom.spec.whatwg.org/#dom-element-closest

public Element? Closest(string selectors)

ComputedStyleMap()

ElementCSSInlineStyle.cs

Returns the computed values of the element as CssStyleValue objects (https://drafts.css-houdini.org/css-typed-om-1/#dom-element-computedstylemap). The map is live; it is empty when the element is not rendered (e.g. not connected).

public StylePropertyMapReadOnly ComputedStyleMap()

ConvertPointFromNode(DomPointInit, GeometryNode, ConvertCoordinateOptions?)

CssomView.GeometryUtils.cs

Converts a point from the coordinates of a node to the coordinates of the element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertpointfromnode).

public DomPoint ConvertPointFromNode(DomPointInit point, GeometryNode from, ConvertCoordinateOptions? options = null)

ConvertQuadFromNode(DomQuadInit, GeometryNode, ConvertCoordinateOptions?)

CssomView.GeometryUtils.cs

Converts a quad from the coordinates of a node to the coordinates of the element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertquadfromnode).

public DomQuad ConvertQuadFromNode(DomQuadInit quad, GeometryNode from, ConvertCoordinateOptions? options = null)

ConvertRectFromNode(DomRectReadOnly, GeometryNode, ConvertCoordinateOptions?)

CssomView.GeometryUtils.cs

Converts a rectangle from the coordinates of a node to the coordinates of the element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-convertrectfromnode).

public DomQuad ConvertRectFromNode(DomRectReadOnly rect, GeometryNode from, ConvertCoordinateOptions? options = null)

GetAccessibilityProperties()

Element.Accessibility.cs

Returns the properties that the accessibility tree exposes for the element: its role, its accessible name and description, and its states (checked, pressed, expanded, selected, disabled, level). The values are computed when the method is called; use Element.CaptureAccessibilityTree for the whole subtree.

public AccessibilityProperties GetAccessibilityProperties()

GetAnimations(GetAnimationsOptions?)

Element.Animations.cs

Returns the relevant animations of the element (or of one of its pseudo-elements, or of its subtree), sorted by their composite order (https://drafts.csswg.org/web-animations-1/#dom-animatable-getanimations).

public IReadOnlyList<Animation> GetAnimations(GetAnimationsOptions? options = null)

Parameters

options GetAnimationsOptions?

Returns

IReadOnlyList<Animation>

Exceptions

DomException
The pseudo-element is invalid (SyntaxError).

See also

GetAttribute(string)

Element.cs

Returns the value of the attribute with the given qualified name, or null when there is none.

public string? GetAttribute(string qualifiedName)

GetAttributeNS(string?, string)

Element.cs

Returns the value of the attribute with the given namespace and local name, or null when there is none.

public string? GetAttributeNS(string? @namespace, string localName)

GetAttributeNames()

Element.cs

Returns the qualified names of the attributes of the element.

public IReadOnlyList<string> GetAttributeNames()

GetAttributeNode(string)

Element.cs

Returns the attribute node with the given qualified name, or null when there is none.

public Attr? GetAttributeNode(string qualifiedName)

GetAttributeNodeNS(string?, string)

Element.cs

Returns the attribute node with the given namespace and local name, or null when there is none.

public Attr? GetAttributeNodeNS(string? @namespace, string localName)

GetBoundingClientRect()

CssomView.cs

Returns the bounding box of the boxes of the element (https://drafts.csswg.org/cssom-view/#dom-element-getboundingclientrect), in the coordinates of the viewport: the union of the rectangles of Element.GetClientRects (ignoring the empty ones, unless they all are), a zero rectangle when the element has no box.

public DomRect GetBoundingClientRect()

GetBoxQuads(BoxQuadOptions?)

CssomView.GeometryUtils.cs

Returns the quads of the boxes of the element (https://drafts.csswg.org/cssom-view/#dom-geometryutils-getboxquads): one per box fragment (or the bounding box of an element of an SVG document fragment), with the transforms, in the coordinates of the viewport or of BoxQuadOptions.RelativeTo.

public IReadOnlyList<DomQuad> GetBoxQuads(BoxQuadOptions? options = null)

GetClientRects()

CssomView.cs

Returns the boxes of the element (https://drafts.csswg.org/cssom-view/#dom-element-getclientrects), in the coordinates of the viewport: the border box of each fragment of its principal box (e.g. one per line for an inline box split over several lines; the table box and the caption boxes of a table), or the bounding box of an element of an SVG document fragment, with the transforms of the element and of its ancestors applied (the bounding box of the transformed box). The list is empty when the element has no box (it is not connected, it or one of its ancestors has display: none, display: contents, or its document has no browsing context).

public DomRectList GetClientRects()

GetElementsByClassName(string)

Element.Collections.cs

Returns a live collection of the descendant elements that have all the given class names.

public HtmlCollection GetElementsByClassName(string classNames)

GetElementsByTagName(string)

Element.Collections.cs

Returns a live collection of the descendant elements with the given qualified name.

public HtmlCollection GetElementsByTagName(string qualifiedName)

GetElementsByTagNameNS(string?, string)

Element.Collections.cs

Returns a live collection of the descendant elements with the given namespace and local name.

public HtmlCollection GetElementsByTagNameNS(string? @namespace, string localName)

GetHtml(GetHtmlOptions?)

DynamicMarkup.cs

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-gethtml

public string GetHtml(GetHtmlOptions? options = null)

HasAttribute(string)

Element.cs

Returns a value indicating whether the element has an attribute with the given qualified name.

public bool HasAttribute(string qualifiedName)

HasAttributeNS(string?, string)

Element.cs

Returns a value indicating whether the element has an attribute with the given namespace and local name.

public bool HasAttributeNS(string? @namespace, string localName)

HasAttributes()

Element.cs

Returns a value indicating whether the element has at least one attribute.

public bool HasAttributes()

HasPointerCapture(int)

Element.PointerCapture.cs

Returns whether the element captures (or is about to capture) a pointer (https://w3c.github.io/pointerevents/#dom-element-haspointercapture).

public bool HasPointerCapture(int pointerId)

InsertAdjacentElement(string, Element)

Element.Collections.cs

Inserts the element at the given position relative to this element and returns it, or null when it cannot be inserted.

public Element? InsertAdjacentElement(string where, Element element)

InsertAdjacentHtml overloads

InsertAdjacentHtml(string, TrustedHtml)

DynamicMarkup.cs

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-insertadjacenthtml

public void InsertAdjacentHtml(string position, TrustedHtml text)

InsertAdjacentHtml(string, string)

DynamicMarkup.cs

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-insertadjacenthtml

public void InsertAdjacentHtml(string position, string text)
Parameters
position string
text string
Exceptions
TypeErrorException
Trusted Types are enforced and the default policy did not convert the value.
See also

InsertAdjacentText(string, string)

Element.Collections.cs

Inserts a text node with the given data at the given position relative to this element.

public void InsertAdjacentText(string where, string data)

MatchContainer(string)

CssomView.cs
  • Experimental (WEBPLATEXP0005)

Returns a ContainerQueryList that evaluates a comma-separated list of container conditions for the element (https://github.com/w3c/csswg-drafts/pull/13551, a tentative extension of CSS Conditional 5).

[Experimental("WEBPLATEXP0005", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public ContainerQueryList MatchContainer(string query)

Matches overloads

Matches(SelectorList)

Element.Collections.cs

Returns whether the element matches the parsed selector (https://dom.spec.whatwg.org/#dom-element-matches).

public bool Matches(SelectorList selectors)
Parameters
selectors SelectorList
Returns

bool

Matches(string)

Element.Collections.cs

https://dom.spec.whatwg.org/#dom-element-matches

public bool Matches(string selectors)

MoveBefore(Node, Node?)

Mixins.Members.cs

Moves the node, preserving its state, before the given child (or to the end when the child is null).

public void MoveBefore(Node node, Node? child)

Prepend(ReadOnlySpan<NodeOrString>)

Mixins.Members.cs

Inserts the nodes before the first child, converting the strings into text nodes.

public void Prepend(params scoped ReadOnlySpan<NodeOrString> nodes)

PrependHtml(string, SetHtmlOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result before the first child.

public void PrependHtml(string html, SetHtmlOptions? options = null)

PrependHtmlUnsafe overloads

PrependHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result before the first child, without the default sanitizer.

public void PrependHtmlUnsafe(TrustedHtml html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

PrependHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and inserts the result before the first child, without the default sanitizer.

public void PrependHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)
Parameters
html string
options SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?
Exceptions
TypeErrorException
Trusted Types are enforced and the options or the value are not trusted.
See also

Pseudo(string)

Element.Pseudo.cs

Returns the pseudo-element of the element designated by a pseudo-element selector (e.g. "::before"), or null when the selector is invalid or does not designate a tree-abiding pseudo-element that is not element-backed (https://drafts.csswg.org/css-pseudo-4/#dom-element-pseudo). The pseudo-element is returned even when it is not generated, and the same object is returned for the same pseudo-element.

public CssPseudoElement? Pseudo(string type)

QuerySelector overloads

QuerySelector(SelectorList)

Mixins.Members.cs

Returns the first descendant element, in tree order, that matches the parsed selector list, or null.

public Element? QuerySelector(SelectorList selectors)
Parameters
selectors SelectorList
Returns

Element?

QuerySelector(string)

Mixins.Members.cs

Returns the first descendant element, in tree order, that matches the selectors, or null.

public Element? QuerySelector(string selectors)

QuerySelector<T>(SelectorList)

Mixins.Members.cs

Returns the first descendant, in tree order, that is a T and matches the parsed selector.

public T? QuerySelector<T>(SelectorList selectors) where T : Element
Type parameters
T
Parameters
selectors SelectorList
Returns

T?

QuerySelector<T>(string)

Mixins.Members.cs

Returns the first descendant, in tree order, that is a T and matches the selector.

public T? QuerySelector<T>(string selectors) where T : Element
Type parameters
T
Parameters
selectors string
Returns

T?

QuerySelectorAll overloads

QuerySelectorAll(SelectorList)

Mixins.Members.cs

Returns the descendant elements, in tree order, that match the parsed selector list.

public NodeList QuerySelectorAll(SelectorList selectors)
Parameters
selectors SelectorList
Returns

NodeList

QuerySelectorAll(string)

Mixins.Members.cs

Returns the descendant elements, in tree order, that match the selectors.

public NodeList QuerySelectorAll(string selectors)

QuerySelectorAll<T>(SelectorList)

Mixins.Members.cs

Returns the descendants, in tree order, that are a T and match the parsed selector.

public IReadOnlyList<T> QuerySelectorAll<T>(SelectorList selectors) where T : Element
Type parameters
T
Parameters
selectors SelectorList
Returns

IReadOnlyList<T>

QuerySelectorAll<T>(string)

Mixins.Members.cs

Returns the descendants, in tree order, that are a T and match the selector.

public IReadOnlyList<T> QuerySelectorAll<T>(string selectors) where T : Element
Type parameters
T
Parameters
selectors string
Returns

IReadOnlyList<T>

ReleasePointerCapture(int)

Element.PointerCapture.cs

Releases the pointer capture of a pointer when the element captures it (https://w3c.github.io/pointerevents/#dom-element-releasepointercapture).

public void ReleasePointerCapture(int pointerId)

Removes this node from its parent, if any.

public void Remove()

RemoveAttribute(string)

Element.cs

Removes the attribute with the given qualified name, if any.

public void RemoveAttribute(string qualifiedName)

RemoveAttributeNS(string?, string)

Element.cs

Removes the attribute with the given namespace and local name, if any.

public void RemoveAttributeNS(string? @namespace, string localName)

RemoveAttributeNode(Attr)

Element.cs

Removes the attribute node from the element and returns it.

public Attr RemoveAttributeNode(Attr attr)

ReplaceChildren(ReadOnlySpan<NodeOrString>)

Mixins.Members.cs

Replaces all the children with the given nodes, converting the strings into text nodes.

public void ReplaceChildren(params scoped ReadOnlySpan<NodeOrString> nodes)

ReplaceWith(ReadOnlySpan<NodeOrString>)

Mixins.Members.cs

Replaces this node with the given nodes in its parent, converting the strings into text nodes.

public void ReplaceWith(params scoped ReadOnlySpan<NodeOrString> nodes)

ReplaceWithHtml(string, SetHtmlOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and replaces this node with the result.

public void ReplaceWithHtml(string html, SetHtmlOptions? options = null)

ReplaceWithHtmlUnsafe overloads

ReplaceWithHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and replaces this node with the result, without the default sanitizer.

public void ReplaceWithHtmlUnsafe(TrustedHtml html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

ReplaceWithHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Insertion.cs

Parses the HTML and replaces this node with the result, without the default sanitizer.

public void ReplaceWithHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

RequestFullscreen(FullscreenOptions?)

Fullscreen.cs

Displays the element fullscreen (https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen): the element and the containers of the ancestor navigables are added to the top layer of their document, and fullscreenchange is fired at them by the next rendering update. The window must have transient activation. The task fails with a TypeErrorException when the element cannot be displayed fullscreen (fullscreenerror is fired).

public Task RequestFullscreen(FullscreenOptions? options = null)

Parameters

options FullscreenOptions?
The options, or null for the default options.

Returns

Task

See also

RequestPointerLock(PointerLockOptions?)

PointerLock.cs

Locks the mouse of the user to the element (https://w3c.github.io/pointerlock/#dom-element-requestpointerlock): its events are then fired at the element, with the position of the pointer when the lock was entered and the movements of the device (MouseEvent.MovementX, MouseEvent.MovementY), until the lock is exited. The window must have transient activation, unless the document released a pointer lock with Document.ExitPointerLock. The pointer is locked by a task, which fires pointerlockchange at the document; the task fails with a DomException when the pointer cannot be locked (pointerlockerror is fired).

public Task RequestPointerLock(PointerLockOptions? options = null)

Parameters

options PointerLockOptions?
The options, or null for the default options.

Returns

Task

See also

Scroll overloads

Scroll(ScrollToOptions?)

CssomView.Scrolling.cs

Scrolls the element (https://drafts.csswg.org/cssom-view/#dom-element-scroll) to the scroll position of ScrollToOptions.Left and ScrollToOptions.Top (the current ones when they are absent): the viewport for the root element (and the body element in quirks mode), else its scrolling box. The task completes when the scroll is completed.

public Task Scroll(ScrollToOptions? options = null)

Scroll(double, double)

CssomView.Scrolling.cs

Scrolls the element to a scroll position (https://drafts.csswg.org/cssom-view/#dom-element-scroll): see Element.Scroll.

public Task Scroll(double x, double y)

ScrollBy overloads

ScrollBy(ScrollToOptions?)

CssomView.Scrolling.cs

Scrolls the element by an offset (https://drafts.csswg.org/cssom-view/#dom-element-scrollby): the offsets are added to Element.ScrollLeft and Element.ScrollTop. A scroll snap container snaps in the direction of the scroll (a relative scroll, https://drafts.csswg.org/css-scroll-snap-1/#relative-scroll).

public Task ScrollBy(ScrollToOptions? options = null)

ScrollBy(double, double)

CssomView.Scrolling.cs

Scrolls the element by an offset (https://drafts.csswg.org/cssom-view/#dom-element-scrollby): see Element.ScrollBy.

public Task ScrollBy(double x, double y)

ScrollIntoView overloads

ScrollIntoView()

CssomView.Scrolling.cs

Scrolls the element into view (https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview), aligning its top with the top of its scrolling boxes.

public Task ScrollIntoView()

ScrollIntoView(ScrollIntoViewOptions?)

CssomView.Scrolling.cs

Scrolls the element into view (https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview): its scrolling boxes, from the innermost to the outermost (or only the nearest one with container: "nearest"), are scrolled to align it as given by the options, with its scroll-margin and their scroll-padding. The task completes when the scrolls are completed.

public Task ScrollIntoView(ScrollIntoViewOptions? options)

ScrollIntoView(bool)

CssomView.Scrolling.cs

Scrolls the element into view (https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview): its block-start edge is aligned with the block-start edge of its scrolling boxes when alignToTop is true, its block-end edge with their block-end edge otherwise.

public Task ScrollIntoView(bool alignToTop)

ScrollTo overloads

ScrollTo(ScrollToOptions?)

CssomView.Scrolling.cs

Scrolls the element (https://drafts.csswg.org/cssom-view/#dom-element-scrollto): see Element.Scroll.

public Task ScrollTo(ScrollToOptions? options = null)

ScrollTo(double, double)

CssomView.Scrolling.cs

Scrolls the element (https://drafts.csswg.org/cssom-view/#dom-element-scrollto): see Element.Scroll.

public Task ScrollTo(double x, double y)

SetAttribute overloads

SetAttribute(string, TrustedType)

Element.cs

https://dom.spec.whatwg.org/#dom-element-setattribute

public void SetAttribute(string qualifiedName, TrustedType value)

SetAttribute(string, string)

Element.cs

https://dom.spec.whatwg.org/#dom-element-setattribute

public void SetAttribute(string qualifiedName, string value)
Parameters
qualifiedName string
value string
Exceptions
TypeErrorException
Trusted Types are enforced for the attribute and the default policy did not convert the value.
See also

SetAttributeNS overloads

SetAttributeNS(string?, string, TrustedType)

Element.cs

https://dom.spec.whatwg.org/#dom-element-setattributens

public void SetAttributeNS(string? @namespace, string qualifiedName, TrustedType value)

SetAttributeNS(string?, string, string)

Element.cs

https://dom.spec.whatwg.org/#dom-element-setattributens

public void SetAttributeNS(string? @namespace, string qualifiedName, string value)
Parameters
namespace string?
qualifiedName string
value string
Exceptions
TypeErrorException
Trusted Types are enforced for the attribute and the default policy did not convert the value.
See also

SetAttributeNode(Attr)

Element.cs

Adds the attribute node to the element and returns the attribute node it replaced, or null.

public Attr? SetAttributeNode(Attr attr)

SetAttributeNodeNS(Attr)

Element.cs

Adds the attribute node to the element and returns the attribute node it replaced, or null.

public Attr? SetAttributeNodeNS(Attr attr)

SetHtml(string, SetHtmlOptions?)

DynamicMarkup.cs

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-sethtml

public void SetHtml(string html, SetHtmlOptions? options = null)

SetHtmlUnsafe overloads

SetHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.cs

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-sethtmlunsafe

public void SetHtmlUnsafe(TrustedHtml html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

SetHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.cs

https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-sethtmlunsafe

public void SetHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)
Parameters
html string
options SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?
Exceptions
TypeErrorException
Trusted Types are enforced and the options or the value are not trusted.
See also

SetInnerHtml(TrustedHtml)

DynamicMarkup.cs

The innerHTML setter with a TrustedHtml value (https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-innerhtml).

public void SetInnerHtml(TrustedHtml html)

SetOuterHtml(TrustedHtml)

DynamicMarkup.cs

The outerHTML setter with a TrustedHtml value (https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-outerhtml).

public void SetOuterHtml(TrustedHtml html)

SetPointerCapture(int)

Element.PointerCapture.cs

Sets the pointer capture of an active pointer to the element (https://w3c.github.io/pointerevents/#dom-element-setpointercapture): its subsequent events are fired at the element until the capture is released. The pointer must be in the active buttons state.

public void SetPointerCapture(int pointerId)

StartViewTransition overloads

StartViewTransition(StartViewTransitionOptions?)

Element.ViewTransitions.cs

Starts a view transition whose root element is the element, with options (https://drafts.csswg.org/css-view-transitions-2/#dom-element-startviewtransition): the update callback and the types of the transition.

public ViewTransition StartViewTransition(StartViewTransitionOptions? options = null)

StartViewTransition(ViewTransitionUpdateCallback)

Element.ViewTransitions.cs

Starts a view transition whose root element is the element (https://drafts.csswg.org/css-view-transitions-2/#dom-element-startviewtransition): the old state of the element and of its subtree is captured at the next rendering opportunity, then the callback updates the document, and the transition between the two states is animated by a tree of pseudo-elements that originate from the element and are painted above its contents. The active view transition of the element, if any, is skipped. On the document element, it is the same as Document.StartViewTransition.

public ViewTransition StartViewTransition(ViewTransitionUpdateCallback callback)
Parameters
callback ViewTransitionUpdateCallback
The callback that updates the document. It is always called, even when the transition cannot happen.
Returns

ViewTransition

See also

StreamAfterHtml(SetHtmlOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and inserts the result after this node as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamAfterHtml(SetHtmlOptions? options = null)

Parameters

options SetHtmlOptions?

Returns

HtmlStreamWriter

StreamAfterHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and inserts the result after this node as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamAfterHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

Parameters

options SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?

Returns

HtmlStreamWriter

Exceptions

TypeErrorException
Trusted Types are enforced, the options are not TrustedHtmlParserOptions and the default policy did not create them.

StreamAppendHtml(SetHtmlOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and inserts the result after the last child as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamAppendHtml(SetHtmlOptions? options = null)

Parameters

options SetHtmlOptions?

Returns

HtmlStreamWriter

StreamAppendHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and inserts the result after the last child as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamAppendHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

Parameters

options SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?

Returns

HtmlStreamWriter

Exceptions

TypeErrorException
Trusted Types are enforced, the options are not TrustedHtmlParserOptions and the default policy did not create them.

StreamBeforeHtml(SetHtmlOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and inserts the result before this node as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamBeforeHtml(SetHtmlOptions? options = null)

Parameters

options SetHtmlOptions?

Returns

HtmlStreamWriter

StreamBeforeHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and inserts the result before this node as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamBeforeHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

Parameters

options SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?

Returns

HtmlStreamWriter

Exceptions

TypeErrorException
Trusted Types are enforced, the options are not TrustedHtmlParserOptions and the default policy did not create them.

StreamHtml(SetHtmlOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and replaces the children with the result as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamHtml(SetHtmlOptions? options = null)

Parameters

options SetHtmlOptions?

Returns

HtmlStreamWriter

StreamHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and replaces the children with the result as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

Parameters

options SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?

Returns

HtmlStreamWriter

Exceptions

TypeErrorException
Trusted Types are enforced, the options are not TrustedHtmlParserOptions and the default policy did not create them.

StreamPrependHtml(SetHtmlOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and inserts the result before the first child as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamPrependHtml(SetHtmlOptions? options = null)

Parameters

options SetHtmlOptions?

Returns

HtmlStreamWriter

StreamPrependHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and inserts the result before the first child as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamPrependHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

Parameters

options SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?

Returns

HtmlStreamWriter

Exceptions

TypeErrorException
Trusted Types are enforced, the options are not TrustedHtmlParserOptions and the default policy did not create them.

StreamReplaceWithHtml(SetHtmlOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and replaces this node with the result as it is parsed (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamReplaceWithHtml(SetHtmlOptions? options = null)

Parameters

options SetHtmlOptions?

Returns

HtmlStreamWriter

StreamReplaceWithHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)

DynamicMarkup.Streaming.cs
  • Experimental (WEBPLATEXP0002)

Returns a writer that parses HTML and replaces this node with the result as it is parsed, without the default sanitizer (proposed by https://github.com/whatwg/html/pull/12758).

[Experimental("WEBPLATEXP0002", UrlFormat = "https://github.com/meziantou/Meziantou.Framework/blob/main/src/Meziantou.Framework.WebPlatform/docs/experimental-apis.md#{0}")]
public HtmlStreamWriter StreamReplaceWithHtmlUnsafe(SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)

Parameters

options SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?

Returns

HtmlStreamWriter

Exceptions

TypeErrorException
Trusted Types are enforced, the options are not TrustedHtmlParserOptions and the default policy did not create them.

ToggleAttribute(string, bool?)

Element.cs

https://dom.spec.whatwg.org/#dom-element-toggleattribute

public bool ToggleAttribute(string qualifiedName, bool? force = null)

WebkitMatchesSelector(string)

Element.Collections.cs

https://dom.spec.whatwg.org/#dom-element-webkitmatchesselector

public bool WebkitMatchesSelector(string selectors)