public final class DOMTokenList extends SimpleScriptable
| Constructor and Description |
|---|
DOMTokenList()
Creates an instance.
|
DOMTokenList(Node node,
String attributeName)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(String token)
Adds the specified token to the underlying string.
|
boolean |
contains(String token)
Checks if the specified token is contained in the underlying string.
|
String |
getDefaultValue(Class<?> hint)
Returns the JavaScript default value of this object.
|
int |
getLength()
Returns the length property.
|
Object |
item(int index)
Returns the item at the specified index.
|
void |
remove(String token)
Removes the specified token from the underlying string.
|
boolean |
toggle(String token)
Toggle the token, by adding or removing.
|
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setClassName, setDomNode, setDomNode, setHtmlElement, setParentScopeapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setPrototype, sizepublic int getLength()
public String getDefaultValue(Class<?> hint)
getDefaultValue in interface net.sourceforge.htmlunit.corejs.javascript.ScriptablegetDefaultValue in class SimpleScriptablehint - a hint as to the format of the default value (ignored in this case)public void add(String token)
token - the token to addpublic void remove(String token)
token - the token to removepublic boolean toggle(String token)
token - the token to add or removepublic boolean contains(String token)
token - the token to addpublic Object item(int index)
index - the index of the itemCopyright © 2002–2015 Gargoyle Software Inc.. All rights reserved.