Element Class
https://dom.spec.whatwg.org/#interface-element
public class Element : Node, IChildNode, INonDocumentTypeChildNode, IParentNode- Inheritance
NodeElement- Implements
Properties
| Name | Description |
|---|---|
| ActiveViewTransition | 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. |
| AriaActiveDescendantElement | Gets or sets the element whose ID is the value of the aria-activedescendant content attribute. |
| AriaAtomic | Gets or sets the value of the aria-atomic content attribute. |
| AriaAutoComplete | Gets or sets the value of the aria-autocomplete content attribute. |
| AriaBrailleLabel | Gets or sets the value of the aria-braillelabel content attribute. |
| AriaBrailleRoleDescription | Gets or sets the value of the aria-brailleroledescription content attribute. |
| AriaBusy | Gets or sets the value of the aria-busy content attribute. |
| AriaChecked | Gets or sets the value of the aria-checked content attribute. |
| AriaColCount | Gets or sets the value of the aria-colcount content attribute. |
| AriaColIndex | Gets or sets the value of the aria-colindex content attribute. |
| AriaColIndexText | Gets or sets the value of the aria-colindextext content attribute. |
| AriaColSpan | Gets or sets the value of the aria-colspan content attribute. |
| AriaControlsElements | Gets or sets the elements whose IDs are the values of the aria-controls content attribute. |
| AriaCurrent | Gets or sets the value of the aria-current content attribute. |
| AriaDescribedByElements | Gets or sets the elements whose IDs are the values of the aria-describedby content attribute. |
| AriaDescription | Gets or sets the value of the aria-description content attribute. |
| AriaDetailsElements | Gets or sets the elements whose IDs are the values of the aria-details content attribute. |
| AriaDisabled | Gets or sets the value of the aria-disabled content attribute. |
| AriaErrorMessageElements | Gets or sets the elements whose IDs are the values of the aria-errormessage content attribute. |
| AriaExpanded | Gets or sets the value of the aria-expanded content attribute. |
| AriaFlowToElements | Gets or sets the elements whose IDs are the values of the aria-flowto content attribute. |
| AriaHasPopup | Gets or sets the value of the aria-haspopup content attribute. |
| AriaHidden | Gets or sets the value of the aria-hidden content attribute. |
| AriaInvalid | Gets or sets the value of the aria-invalid content attribute. |
| AriaKeyShortcuts | Gets or sets the value of the aria-keyshortcuts content attribute. |
| AriaLabel | Gets or sets the value of the aria-label content attribute. |
| AriaLabelledByElements | Gets or sets the elements whose IDs are the values of the aria-labelledby content attribute. |
| AriaLevel | Gets or sets the value of the aria-level content attribute. |
| AriaLive | Gets or sets the value of the aria-live content attribute. |
| AriaModal | Gets or sets the value of the aria-modal content attribute. |
| AriaMultiLine | Gets or sets the value of the aria-multiline content attribute. |
| AriaMultiSelectable | Gets or sets the value of the aria-multiselectable content attribute. |
| AriaOrientation | Gets or sets the value of the aria-orientation content attribute. |
| AriaOwnsElements | Gets or sets the elements whose IDs are the values of the aria-owns content attribute. |
| AriaPlaceholder | Gets or sets the value of the aria-placeholder content attribute. |
| AriaPosInSet | Gets or sets the value of the aria-posinset content attribute. |
| AriaPressed | Gets or sets the value of the aria-pressed content attribute. |
| AriaReadOnly | Gets or sets the value of the aria-readonly content attribute. |
| AriaRelevant | Gets or sets the value of the aria-relevant content attribute. |
| AriaRequired | Gets or sets the value of the aria-required content attribute. |
| AriaRoleDescription | Gets or sets the value of the aria-roledescription content attribute. |
| AriaRowCount | Gets or sets the value of the aria-rowcount content attribute. |
| AriaRowIndex | Gets or sets the value of the aria-rowindex content attribute. |
| AriaRowIndexText | Gets or sets the value of the aria-rowindextext content attribute. |
| AriaRowSpan | Gets or sets the value of the aria-rowspan content attribute. |
| AriaSelected | Gets or sets the value of the aria-selected content attribute. |
| AriaSetSize | Gets or sets the value of the aria-setsize content attribute. |
| AriaSort | Gets or sets the value of the aria-sort content attribute. |
| AriaValueMax | Gets or sets the value of the aria-valuemax content attribute. |
| AriaValueMin | Gets or sets the value of the aria-valuemin content attribute. |
| AriaValueNow | Gets or sets the value of the aria-valuenow content attribute. |
| AriaValueText | Gets or sets the value of the aria-valuetext content attribute. |
| AssignedSlot | Gets the slot the element is assigned to, or null when it is not assigned to an open shadow tree slot. |
| Attributes | Gets the live map of the attributes of the element. |
| ChildElementCount | Gets the number of child elements. |
| Children | Gets the live collection of the child elements. |
| ClassList | Gets the live token list of the class attribute. |
| ClassName | Gets or sets the value of the class attribute. |
| ClientHeight | Gets the height of the padding box without the scrollbar (https://drafts.csswg.org/cssom-view/#dom-element-clientheight): see Element.ClientWidth. |
| ClientLeft | 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. |
| ClientTop | 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. |
| ClientWidth | 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. |
| ComputedName | 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. |
| ComputedRole | 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. |
| CurrentCssZoom | Gets the effective zoom of the element (https://drafts.csswg.org/cssom-view/#dom-element-currentcsszoom), or 1 when it is not being rendered. |
| CustomElementRegistry | 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. |
| ElementTiming | 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). |
| FirstElementChild | Gets the first child that is an element, or null when there is none. |
| Id | Gets or sets the value of the id attribute. |
| InnerHtml | https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-innerhtml |
| LastElementChild | Gets the last child that is an element, or null when there is none. |
| LocalName | Gets the local name of the element. |
| NamespaceUri | Gets the namespace of the element, or null when it has none. |
| NextElementSibling | Gets the closest following sibling that is an element, or null when there is none. |
| NodeName | Gets the node name of the element, which is its tag name. |
| NodeType | Gets the node type of an element, which is 1 (ELEMENT_NODE). |
| OnFullscreenChange | Gets or sets the event handler of the fullscreenchange event (the onfullscreenchange event handler attribute). |
| OnFullscreenError | Gets or sets the event handler of the fullscreenerror event (the onfullscreenerror event handler attribute). |
| OuterHtml | https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-outerhtml |
| Part | 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(). |
| Prefix | Gets the namespace prefix of the element, or null when it has none. |
| PreviousElementSibling | Gets the closest preceding sibling that is an element, or null when there is none. |
| Role | Gets or sets the value of the role content attribute. |
| ScrollHeight | Gets the height of the scrolling area (https://drafts.csswg.org/cssom-view/#dom-element-scrollheight): see Element.ScrollWidth. |
| ScrollLeft | 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). |
| ScrollTop | 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). |
| ScrollWidth | 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). |
| ShadowRoot | Gets the open shadow root of the element, or null when it has none or it is closed. |
| Slot | Gets or sets the value of the slot attribute. |
| TagName | https://dom.spec.whatwg.org/#element-html-uppercased-qualified-name |
| TextContent | Gets or sets the concatenation of the text of the descendant text nodes; setting it replaces all the children. |
ActiveViewTransition
Element.ViewTransitions.csGets 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.csGets or sets the element whose ID is the value of the aria-activedescendant content attribute.
public Element? AriaActiveDescendantElement { get; set; }AriaAtomic
Element.g.csGets or sets the value of the aria-atomic content attribute.
public string? AriaAtomic { get; set; }AriaAutoComplete
Element.g.csGets or sets the value of the aria-autocomplete content attribute.
public string? AriaAutoComplete { get; set; }AriaBrailleLabel
Element.g.csGets or sets the value of the aria-braillelabel content attribute.
public string? AriaBrailleLabel { get; set; }AriaBrailleRoleDescription
Element.g.csGets or sets the value of the aria-brailleroledescription content attribute.
public string? AriaBrailleRoleDescription { get; set; }AriaBusy
Element.g.csGets or sets the value of the aria-busy content attribute.
public string? AriaBusy { get; set; }AriaChecked
Element.g.csGets or sets the value of the aria-checked content attribute.
public string? AriaChecked { get; set; }AriaColCount
Element.g.csGets or sets the value of the aria-colcount content attribute.
public string? AriaColCount { get; set; }AriaColIndex
Element.g.csGets or sets the value of the aria-colindex content attribute.
public string? AriaColIndex { get; set; }AriaColIndexText
Element.g.csGets or sets the value of the aria-colindextext content attribute.
public string? AriaColIndexText { get; set; }AriaColSpan
Element.g.csGets or sets the value of the aria-colspan content attribute.
public string? AriaColSpan { get; set; }AriaControlsElements
Element.g.csGets or sets the elements whose IDs are the values of the aria-controls content attribute.
public IReadOnlyList<Element>? AriaControlsElements { get; set; }Property value
See also
AriaCurrent
Element.g.csGets or sets the value of the aria-current content attribute.
public string? AriaCurrent { get; set; }AriaDescribedByElements
Element.g.csGets or sets the elements whose IDs are the values of the aria-describedby content attribute.
public IReadOnlyList<Element>? AriaDescribedByElements { get; set; }Property value
See also
AriaDescription
Element.g.csGets or sets the value of the aria-description content attribute.
public string? AriaDescription { get; set; }AriaDetailsElements
Element.g.csGets or sets the elements whose IDs are the values of the aria-details content attribute.
public IReadOnlyList<Element>? AriaDetailsElements { get; set; }Property value
See also
AriaDisabled
Element.g.csGets or sets the value of the aria-disabled content attribute.
public string? AriaDisabled { get; set; }AriaErrorMessageElements
Element.g.csGets or sets the elements whose IDs are the values of the aria-errormessage content attribute.
public IReadOnlyList<Element>? AriaErrorMessageElements { get; set; }AriaExpanded
Element.g.csGets or sets the value of the aria-expanded content attribute.
public string? AriaExpanded { get; set; }AriaFlowToElements
Element.g.csGets or sets the elements whose IDs are the values of the aria-flowto content attribute.
public IReadOnlyList<Element>? AriaFlowToElements { get; set; }Property value
See also
AriaHasPopup
Element.g.csGets or sets the value of the aria-haspopup content attribute.
public string? AriaHasPopup { get; set; }AriaHidden
Element.g.csGets or sets the value of the aria-hidden content attribute.
public string? AriaHidden { get; set; }AriaInvalid
Element.g.csGets or sets the value of the aria-invalid content attribute.
public string? AriaInvalid { get; set; }AriaKeyShortcuts
Element.g.csGets or sets the value of the aria-keyshortcuts content attribute.
public string? AriaKeyShortcuts { get; set; }AriaLabel
Element.g.csGets or sets the value of the aria-label content attribute.
public string? AriaLabel { get; set; }AriaLabelledByElements
Element.g.csGets or sets the elements whose IDs are the values of the aria-labelledby content attribute.
public IReadOnlyList<Element>? AriaLabelledByElements { get; set; }Property value
See also
AriaLevel
Element.g.csGets or sets the value of the aria-level content attribute.
public string? AriaLevel { get; set; }AriaLive
Element.g.csGets or sets the value of the aria-live content attribute.
public string? AriaLive { get; set; }AriaModal
Element.g.csGets or sets the value of the aria-modal content attribute.
public string? AriaModal { get; set; }AriaMultiLine
Element.g.csGets or sets the value of the aria-multiline content attribute.
public string? AriaMultiLine { get; set; }AriaMultiSelectable
Element.g.csGets or sets the value of the aria-multiselectable content attribute.
public string? AriaMultiSelectable { get; set; }AriaOrientation
Element.g.csGets or sets the value of the aria-orientation content attribute.
public string? AriaOrientation { get; set; }AriaOwnsElements
Element.g.csGets or sets the elements whose IDs are the values of the aria-owns content attribute.
public IReadOnlyList<Element>? AriaOwnsElements { get; set; }Property value
See also
AriaPlaceholder
Element.g.csGets or sets the value of the aria-placeholder content attribute.
public string? AriaPlaceholder { get; set; }AriaPosInSet
Element.g.csGets or sets the value of the aria-posinset content attribute.
public string? AriaPosInSet { get; set; }AriaPressed
Element.g.csGets or sets the value of the aria-pressed content attribute.
public string? AriaPressed { get; set; }AriaReadOnly
Element.g.csGets or sets the value of the aria-readonly content attribute.
public string? AriaReadOnly { get; set; }AriaRelevant
Element.g.csGets or sets the value of the aria-relevant content attribute.
public string? AriaRelevant { get; set; }AriaRequired
Element.g.csGets or sets the value of the aria-required content attribute.
public string? AriaRequired { get; set; }AriaRoleDescription
Element.g.csGets or sets the value of the aria-roledescription content attribute.
public string? AriaRoleDescription { get; set; }AriaRowCount
Element.g.csGets or sets the value of the aria-rowcount content attribute.
public string? AriaRowCount { get; set; }AriaRowIndex
Element.g.csGets or sets the value of the aria-rowindex content attribute.
public string? AriaRowIndex { get; set; }AriaRowIndexText
Element.g.csGets or sets the value of the aria-rowindextext content attribute.
public string? AriaRowIndexText { get; set; }AriaRowSpan
Element.g.csGets or sets the value of the aria-rowspan content attribute.
public string? AriaRowSpan { get; set; }AriaSelected
Element.g.csGets or sets the value of the aria-selected content attribute.
public string? AriaSelected { get; set; }AriaSetSize
Element.g.csGets or sets the value of the aria-setsize content attribute.
public string? AriaSetSize { get; set; }AriaSort
Element.g.csGets or sets the value of the aria-sort content attribute.
public string? AriaSort { get; set; }AriaValueMax
Element.g.csGets or sets the value of the aria-valuemax content attribute.
public string? AriaValueMax { get; set; }AriaValueMin
Element.g.csGets or sets the value of the aria-valuemin content attribute.
public string? AriaValueMin { get; set; }AriaValueNow
Element.g.csGets or sets the value of the aria-valuenow content attribute.
public string? AriaValueNow { get; set; }AriaValueText
Element.g.csGets or sets the value of the aria-valuetext content attribute.
public string? AriaValueText { get; set; }AssignedSlot
Element.csGets the slot the element is assigned to, or null when it is not assigned to an open shadow tree slot.
public HtmlSlotElement? AssignedSlot { get; }Attributes
Element.Collections.csGets the live map of the attributes of the element.
public NamedNodeMap Attributes { get; }ChildElementCount
Mixins.Members.csGets the number of child elements.
public uint ChildElementCount { get; }Children
Mixins.Members.csGets the live collection of the child elements.
public HtmlCollection Children { get; }ClassList
Element.Collections.csGets the live token list of the class attribute.
public DomTokenList ClassList { get; }ClassName
Element.csGets or sets the value of the class attribute.
public string ClassName { get; set; }ClientHeight
CssomView.Scrolling.csGets 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; }ClientLeft
CssomView.Scrolling.csGets 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; }ClientTop
CssomView.Scrolling.csGets 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; }ClientWidth
CssomView.Scrolling.csGets 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; }ComputedName
Element.Accessibility.csThe 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
ComputedRole
Element.Accessibility.csThe 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
CurrentCssZoom
CssomView.Scrolling.csGets 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.cshttps://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; }Property value
See also
ElementTiming
Element.csGets 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.csGets 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; }InnerHtml
DynamicMarkup.cshttps://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-innerhtml
public string InnerHtml { get; set; }Property value
Exceptions
TypeErrorException- Trusted Types are enforced and the default policy did not convert the value.
See also
LastElementChild
Mixins.Members.csGets the last child that is an element, or null when there is none.
public Element? LastElementChild { get; }LocalName
Element.csGets the local name of the element.
public string LocalName { get; }NamespaceUri
Element.csGets the namespace of the element, or null when it has none.
public string? NamespaceUri { get; }NextElementSibling
Mixins.Members.csGets the closest following sibling that is an element, or null when there is none.
public Element? NextElementSibling { get; }Property value
See also
NodeName
Element.csNodeType
Element.csOnFullscreenChange
Element.g.csGets or sets the event handler of the fullscreenchange event (the onfullscreenchange event handler attribute).
Property value
See also
OnFullscreenError
Element.g.csGets or sets the event handler of the fullscreenerror event (the onfullscreenerror event handler attribute).
Property value
See also
OuterHtml
DynamicMarkup.cshttps://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-outerhtml
public string OuterHtml { get; set; }Part
Element.Parts.csThe 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; }Prefix
Element.csGets the namespace prefix of the element, or null when it has none.
public string? Prefix { get; }PreviousElementSibling
Mixins.Members.csGets the closest preceding sibling that is an element, or null when there is none.
public Element? PreviousElementSibling { get; }Property value
See also
Role
Element.g.csGets or sets the value of the role content attribute.
public string? Role { get; set; }ScrollHeight
CssomView.Scrolling.csGets the height of the scrolling area (https://drafts.csswg.org/cssom-view/#dom-element-scrollheight): see Element.ScrollWidth.
public int ScrollHeight { get; }ScrollLeft
CssomView.Scrolling.csGets 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; }ScrollTop
CssomView.Scrolling.csGets 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; }ScrollWidth
CssomView.Scrolling.csGets 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.csGets the open shadow root of the element, or null when it has none or it is closed.
public ShadowRoot? ShadowRoot { get; }Slot
Element.csGets or sets the value of the slot attribute.
public string Slot { get; set; }TagName
Element.cshttps://dom.spec.whatwg.org/#element-html-uppercased-qualified-name
public string TagName { get; }TextContent
Element.csMethods
| Name | Description |
|---|---|
| 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.csInserts 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.csParses the HTML and inserts the result after this node.
public void AfterHtml(string html, SetHtmlOptions? options = null)AfterHtmlUnsafe overloads
AfterHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)
DynamicMarkup.Insertion.csParses 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.csParses the HTML and inserts the result after this node, without the default sanitizer.
public void AfterHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)Parameters
Exceptions
TypeErrorException- Trusted Types are enforced and the options or the value are not trusted.
See also
Animate overloads
Animate(IEnumerable<Keyframe>?, KeyframeAnimationOptions?)
Element.Animations.csCreates 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
keyframesIEnumerable<Keyframe>?optionsKeyframeAnimationOptions?
Returns
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.csCreates 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
keyframesIEnumerable<Keyframe>?durationdouble
Returns
Exceptions
TypeErrorException- The keyframes or the duration are invalid.
See also
Append(ReadOnlySpan<NodeOrString>)
Mixins.Members.csInserts the nodes after the last child, converting the strings into text nodes.
public void Append(params scoped ReadOnlySpan<NodeOrString> nodes)Parameters
See also
AppendHtml(string, SetHtmlOptions?)
DynamicMarkup.Insertion.csParses 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.csParses 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.csParses the HTML and inserts the result after the last child, without the default sanitizer.
public void AppendHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)Parameters
Exceptions
TypeErrorException- Trusted Types are enforced and the options or the value are not trusted.
See also
AttachShadow(ShadowRootInit)
Element.cshttps://dom.spec.whatwg.org/#dom-element-attachshadow
public ShadowRoot AttachShadow(ShadowRootInit init)Before(ReadOnlySpan<NodeOrString>)
Mixins.Members.csInserts 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.csParses the HTML and inserts the result before this node.
public void BeforeHtml(string html, SetHtmlOptions? options = null)BeforeHtmlUnsafe overloads
BeforeHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)
DynamicMarkup.Insertion.csParses 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.csParses the HTML and inserts the result before this node, without the default sanitizer.
public void BeforeHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)Parameters
Exceptions
TypeErrorException- Trusted Types are enforced and the options or the value are not trusted.
See also
CaptureAccessibilityTree()
Element.Accessibility.csCaptures 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()Returns
CheckVisibility(CheckVisibilityOptions?)
CssomView.Scrolling.csReturns 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.csReturns the closest inclusive ancestor that matches the parsed selector (https://dom.spec.whatwg.org/#dom-element-closest).
public Element? Closest(SelectorList selectors)Closest(string)
Element.Collections.cshttps://dom.spec.whatwg.org/#dom-element-closest
ComputedStyleMap()
ElementCSSInlineStyle.csReturns 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.csConverts 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.csConverts 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.csConverts 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.csReturns 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()Returns
GetAnimations(GetAnimationsOptions?)
Element.Animations.csReturns 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
optionsGetAnimationsOptions?
Returns
Exceptions
DomException- The pseudo-element is invalid (SyntaxError).
See also
GetAttribute(string)
Element.csReturns the value of the attribute with the given qualified name, or null when there is none.
GetAttributeNS(string?, string)
Element.csGetAttributeNames()
Element.csReturns the qualified names of the attributes of the element.
public IReadOnlyList<string> GetAttributeNames()GetAttributeNode(string)
Element.csReturns the attribute node with the given qualified name, or null when there is none.
GetAttributeNodeNS(string?, string)
Element.csGetBoundingClientRect()
CssomView.csReturns 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.csReturns 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.csReturns 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.csReturns a live collection of the descendant elements that have all the given class names.
public HtmlCollection GetElementsByClassName(string classNames)GetElementsByTagName(string)
Element.Collections.csReturns a live collection of the descendant elements with the given qualified name.
public HtmlCollection GetElementsByTagName(string qualifiedName)GetElementsByTagNameNS(string?, string)
Element.Collections.csReturns a live collection of the descendant elements with the given namespace and local name.
public HtmlCollection GetElementsByTagNameNS(string? @namespace, string localName)Parameters
Returns
See also
GetHtml(GetHtmlOptions?)
DynamicMarkup.cshttps://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-gethtml
public string GetHtml(GetHtmlOptions? options = null)HasAttribute(string)
Element.csReturns a value indicating whether the element has an attribute with the given qualified name.
HasAttributeNS(string?, string)
Element.csHasAttributes()
Element.csReturns a value indicating whether the element has at least one attribute.
public bool HasAttributes()HasPointerCapture(int)
Element.PointerCapture.csReturns whether the element captures (or is about to capture) a pointer (https://w3c.github.io/pointerevents/#dom-element-haspointercapture).
InsertAdjacentElement(string, Element)
Element.Collections.csInserts the element at the given position relative to this element and returns it, or null when it cannot be inserted.
Parameters
Returns
See also
InsertAdjacentHtml overloads
InsertAdjacentHtml(string, TrustedHtml)
DynamicMarkup.cshttps://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-insertadjacenthtml
public void InsertAdjacentHtml(string position, TrustedHtml text)InsertAdjacentHtml(string, string)
DynamicMarkup.cshttps://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-insertadjacenthtml
Parameters
Exceptions
TypeErrorException- Trusted Types are enforced and the default policy did not convert the value.
See also
InsertAdjacentText(string, string)
Element.Collections.csMatchContainer(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.csReturns whether the element matches the parsed selector (https://dom.spec.whatwg.org/#dom-element-matches).
public bool Matches(SelectorList selectors)Matches(string)
Element.Collections.cshttps://dom.spec.whatwg.org/#dom-element-matches
MoveBefore(Node, Node?)
Mixins.Members.csPrepend(ReadOnlySpan<NodeOrString>)
Mixins.Members.csInserts the nodes before the first child, converting the strings into text nodes.
public void Prepend(params scoped ReadOnlySpan<NodeOrString> nodes)Parameters
See also
PrependHtml(string, SetHtmlOptions?)
DynamicMarkup.Insertion.csParses 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.csParses 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.csParses the HTML and inserts the result before the first child, without the default sanitizer.
public void PrependHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)Parameters
Exceptions
TypeErrorException- Trusted Types are enforced and the options or the value are not trusted.
See also
Pseudo(string)
Element.Pseudo.csReturns 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.csReturns the first descendant element, in tree order, that matches the parsed selector list, or null.
public Element? QuerySelector(SelectorList selectors)QuerySelector(string)
Mixins.Members.csReturns the first descendant element, in tree order, that matches the selectors, or null.
QuerySelector<T>(SelectorList)
Mixins.Members.csReturns the first descendant, in tree order, that is a T and matches the parsed selector.
public T? QuerySelector<T>(SelectorList selectors) where T : ElementQuerySelector<T>(string)
Mixins.Members.csQuerySelectorAll overloads
QuerySelectorAll(SelectorList)
Mixins.Members.csReturns the descendant elements, in tree order, that match the parsed selector list.
public NodeList QuerySelectorAll(SelectorList selectors)QuerySelectorAll(string)
Mixins.Members.csReturns the descendant elements, in tree order, that match the selectors.
QuerySelectorAll<T>(SelectorList)
Mixins.Members.csReturns the descendants, in tree order, that are a T and match the parsed selector.
public IReadOnlyList<T> QuerySelectorAll<T>(SelectorList selectors) where T : ElementQuerySelectorAll<T>(string)
Mixins.Members.csReturns the descendants, in tree order, that are a T and match the selector.
public IReadOnlyList<T> QuerySelectorAll<T>(string selectors) where T : ElementReleasePointerCapture(int)
Element.PointerCapture.csReleases the pointer capture of a pointer when the element captures it (https://w3c.github.io/pointerevents/#dom-element-releasepointercapture).
Remove()
Mixins.Members.csRemoves this node from its parent, if any.
public void Remove()RemoveAttribute(string)
Element.csRemoves the attribute with the given qualified name, if any.
RemoveAttributeNS(string?, string)
Element.csRemoveAttributeNode(Attr)
Element.csRemoves the attribute node from the element and returns it.
ReplaceChildren(ReadOnlySpan<NodeOrString>)
Mixins.Members.csReplaces all the children with the given nodes, converting the strings into text nodes.
public void ReplaceChildren(params scoped ReadOnlySpan<NodeOrString> nodes)Parameters
See also
ReplaceWith(ReadOnlySpan<NodeOrString>)
Mixins.Members.csReplaces this node with the given nodes in its parent, converting the strings into text nodes.
public void ReplaceWith(params scoped ReadOnlySpan<NodeOrString> nodes)Parameters
See also
ReplaceWithHtml(string, SetHtmlOptions?)
DynamicMarkup.Insertion.csParses the HTML and replaces this node with the result.
public void ReplaceWithHtml(string html, SetHtmlOptions? options = null)ReplaceWithHtmlUnsafe overloads
ReplaceWithHtmlUnsafe(TrustedHtml, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)
DynamicMarkup.Insertion.csParses 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.csParses the HTML and replaces this node with the result, without the default sanitizer.
public void ReplaceWithHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)Parameters
Exceptions
TypeErrorException- Trusted Types are enforced and the options or the value are not trusted.
See also
RequestFullscreen(FullscreenOptions?)
Fullscreen.csDisplays 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)RequestPointerLock(PointerLockOptions?)
PointerLock.csLocks 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)Scroll overloads
Scroll(ScrollToOptions?)
CssomView.Scrolling.csScrolls 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.csScrolls the element to a scroll position (https://drafts.csswg.org/cssom-view/#dom-element-scroll): see Element.Scroll.
Parameters
Returns
See also
ScrollBy overloads
ScrollBy(ScrollToOptions?)
CssomView.Scrolling.csScrolls 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.csScrolls the element by an offset (https://drafts.csswg.org/cssom-view/#dom-element-scrollby): see Element.ScrollBy.
Parameters
Returns
See also
ScrollIntoView overloads
ScrollIntoView()
CssomView.Scrolling.csScrolls 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.csScrolls 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.csScrolls 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 overloads
ScrollTo(ScrollToOptions?)
CssomView.Scrolling.csScrolls 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.csScrolls the element (https://drafts.csswg.org/cssom-view/#dom-element-scrollto): see Element.Scroll.
Parameters
Returns
See also
SetAttribute overloads
SetAttribute(string, TrustedType)
Element.cshttps://dom.spec.whatwg.org/#dom-element-setattribute
public void SetAttribute(string qualifiedName, TrustedType value)SetAttribute(string, string)
Element.cshttps://dom.spec.whatwg.org/#dom-element-setattribute
Parameters
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.cshttps://dom.spec.whatwg.org/#dom-element-setattributens
public void SetAttributeNS(string? @namespace, string qualifiedName, TrustedType value)SetAttributeNS(string?, string, string)
Element.cshttps://dom.spec.whatwg.org/#dom-element-setattributens
Parameters
Exceptions
TypeErrorException- Trusted Types are enforced for the attribute and the default policy did not convert the value.
See also
SetAttributeNode(Attr)
Element.csAdds the attribute node to the element and returns the attribute node it replaced, or null.
SetAttributeNodeNS(Attr)
Element.csAdds the attribute node to the element and returns the attribute node it replaced, or null.
SetHtml(string, SetHtmlOptions?)
DynamicMarkup.cshttps://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.cshttps://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-sethtmlunsafe
public void SetHtmlUnsafe(TrustedHtml html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)Parameters
Exceptions
TypeErrorException- Trusted Types are enforced and the options are not trusted.
See also
SetHtmlUnsafe(string, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions?)
DynamicMarkup.cshttps://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-element-sethtmlunsafe
public void SetHtmlUnsafe(string html, SetHtmlUnsafeOptionsOrTrustedHtmlParserOptions? options = null)Parameters
Exceptions
TypeErrorException- Trusted Types are enforced and the options or the value are not trusted.
See also
SetInnerHtml(TrustedHtml)
DynamicMarkup.csThe 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.csThe 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.csSets 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 overloads
StartViewTransition(StartViewTransitionOptions?)
Element.ViewTransitions.csStarts 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.csStarts 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
callbackViewTransitionUpdateCallback- The callback that updates the document. It is always called, even when the transition cannot happen.
Returns
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)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
Returns
Exceptions
TypeErrorException- Trusted Types are enforced, the options are not
TrustedHtmlParserOptionsand 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)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
Returns
Exceptions
TypeErrorException- Trusted Types are enforced, the options are not
TrustedHtmlParserOptionsand 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)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
Returns
Exceptions
TypeErrorException- Trusted Types are enforced, the options are not
TrustedHtmlParserOptionsand 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)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
Returns
Exceptions
TypeErrorException- Trusted Types are enforced, the options are not
TrustedHtmlParserOptionsand 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)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
Returns
Exceptions
TypeErrorException- Trusted Types are enforced, the options are not
TrustedHtmlParserOptionsand 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)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
Returns
Exceptions
TypeErrorException- Trusted Types are enforced, the options are not
TrustedHtmlParserOptionsand the default policy did not create them.
ToggleAttribute(string, bool?)
Element.csWebkitMatchesSelector(string)
Element.Collections.cshttps://dom.spec.whatwg.org/#dom-element-webkitmatchesselector