DomTokenList
Summary
Represents a set of space-separated tokens corresponding to an element's
Remarks
Danger
All calls made within this class MUST be performed on the Master Thread. See Threads.RunLater on how to safely call this from an asynchronous thread. Failure to comply with this can cause catastrophical failures as the engine is not designed for this.
Definition
Namespace: SDT4.Managed.UI.Rml
Assembly: SDT4.Managed.UI.dll
struct DomTokenList
Implements:
Fields
| Name | Type | Description |
|---|---|---|
Properties
| Name | Type | Description |
|---|---|---|
Methods
public Boolean Toggle(String className, Nullable<Boolean> force)
Summary:
Adds or removes a class token depending on the specified boolean flag.
Corresponds to JavaScript
Parameters:
-
className(String): The name of the class token to toggle. -
force(Nullable<Boolean>): If included, when, adds the class; if , removes the class.
Returns:
public Void Remove(String className, String[] rest)
Summary:
Removes one or more class tokens from the element.
Corresponds to JavaScript
Parameters:
-
className(String): The first class token to remove. -
rest(String[]): Additional class tokens to remove.
public Void Remove(IEnumerable<String> list)
Summary: Removes a collection of class tokens from the element.
Parameters:
list(IEnumerable<String>): An enumerable collection of class tokens to remove.
public Void Add(String className, String[] rest)
Summary:
Adds one or more class tokens to the element.
Corresponds to JavaScript
Parameters:
public Void Add(IEnumerable<String> list)
Summary: Adds a collection of class tokens to the element.
Parameters:
list(IEnumerable<String>): An enumerable collection of class tokens to add.
public Boolean Replace(String oldName, String newName)
Summary:
Replaces an existing class token with a new class token.
Corresponds to JavaScript
Parameters:
Returns:
public Boolean Contains(String className)
Summary:
Determines whether the element currently has the specified class token.
Corresponds to JavaScript
Parameters:
className(String): The class token to search for.
Returns:
- Boolean:
if the class token is present; otherwise, .