@JsType(isNative=true)
public static interface DomElement.DomTokenList
| Modifier and Type | Method and Description |
|---|---|
void |
add(String token)
Adds
token to the underlying string. |
boolean |
contains(String token)
Returns whether the underlying string contains
token. |
int |
getLength()
Returns the
length property. |
String |
item(int index)
Returns an item in the list by its index.
|
void |
remove(String token)
Removes
token from the underlying string. |
boolean |
toggle(String token)
Removes
token from string and returns false
. |
@JsProperty int getLength()
length property.String item(int index)
index - the index to look for the itemboolean contains(String token)
token.token - the token to check fortrue if token was found, false if
notvoid add(String token)
token to the underlying string.token - the token to addvoid remove(String token)
token from the underlying string.token - the token to removeboolean toggle(String token)
token from string and returns false
. If token doesn't exist it's added and the function
returns true.token - the token to toggletrue if token did not exist and was added,
false if token existed and was removedCopyright © 2000–2020 Vaadin Ltd. All rights reserved.