CustomStateSet Class

https://html.spec.whatwg.org/multipage/custom-elements.html#customstateset: the states of a custom element, matched by the :state() pseudo-class. It is a setlike<DOMString>: the items are enumerated in insertion order, and, as for a JavaScript Set, an enumeration sees the changes made while it is in progress.

public sealed class CustomStateSet : IEnumerable<string>, IReadOnlyCollection<string>, IEnumerable
Implements

Properties

NameDescription
CountGets the number of states.

Gets the number of states.

public int Count { get; }

Property value

int

Methods

NameDescription
Add(string)Adds a state.
Clear()Removes all the states.
Delete(string)Removes a state. Returns whether the set contained the state.
GetEnumerator()Enumerates the states, including the states added during the enumeration.
Has(string)Returns whether the set contains the state.
System.Collections.IEnumerable.GetEnumerator()

Adds a state.

public void Add(string value)

Parameters

value string

Removes all the states.

public void Clear()

Delete(string)

CustomStateSet.cs

Removes a state. Returns whether the set contained the state.

public bool Delete(string value)

Parameters

value string

Returns

bool

GetEnumerator()

CustomStateSet.cs

Enumerates the states, including the states added during the enumeration.

public IEnumerator<string> GetEnumerator()

Returns whether the set contains the state.

public bool Has(string value)

Parameters

value string

Returns

bool

System.Collections.IEnumerable.GetEnumerator()

CustomStateSet.cs
IEnumerator IEnumerable.GetEnumerator()

No documentation is available.