Method AddClass
AddClass(string, params string[])
Adds one or more CSS classes to the element specified by a selector or DOM reference.
Declaration
Task AddClass(string selectorOrElement, params string[] classNames)
Parameters
Type | Name | Description |
---|---|---|
string | selectorOrElement | A CSS selector (e.g., "#myElement") or an ElementReference representing the target element. |
string[] | classNames | One or more CSS class names to add. |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |
AddClass(ElementReference, params string[])
Adds one or more CSS classes to the element specified by a selector or DOM reference.
Declaration
Task AddClass(ElementReference elementRef, params string[] classNames)
Parameters
Type | Name | Description |
---|---|---|
ElementReference | elementRef | A reference to the HTML element. |
string[] | classNames | One or more CSS class names to add. |
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous operation. |