public class NamedNodeMap extends HtmlUnitScriptable
HtmlElement,
but case-sensitive when used with a DomElement.org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunctionCONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Constructor and Description |
|---|
NamedNodeMap()
We need default constructors to build the prototype instance.
|
NamedNodeMap(DomElement element)
Creates a new named node map for the specified element.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get(int index,
org.htmlunit.corejs.javascript.Scriptable start)
Returns the element at the specified index, or
Scriptable.NOT_FOUND if the index is invalid. |
Object |
get(String name,
org.htmlunit.corejs.javascript.Scriptable start)
Gets a named property from the object.
|
int |
getLength()
Returns the number of attributes in this named node map.
|
HtmlUnitScriptable |
getNamedItem(String name)
Gets the specified attribute.
|
Node |
getNamedItemNS(String namespaceURI,
String localName)
Gets the specified attribute.
|
HtmlUnitScriptable |
getNamedItemWithoutSytheticClassAttr(String name)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
|
boolean |
has(int index,
org.htmlunit.corejs.javascript.Scriptable start) |
HtmlUnitScriptable |
item(int index)
Returns the item at the specified index.
|
org.htmlunit.corejs.javascript.Scriptable |
iterator() |
void |
jsConstructor()
JavaScript constructor.
|
void |
removeNamedItem(String name)
Removes the specified attribute.
|
Attr |
removeNamedItemNS(String namespaceURI,
String localName)
Removes the specified attribute.
|
void |
setNamedItem(Node node)
Sets the specified attribute.
|
void |
setNamedItemNS(Node node)
Sets the specified attribute.
|
clone, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getWindow, getWindow, getWindowFromTopCallScope, getWithPreemption, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromiseapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkSlotRemoval, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, sizecreateSlotMappublic NamedNodeMap()
public NamedNodeMap(DomElement element)
element - the owning elementpublic void jsConstructor()
public final Object get(int index, org.htmlunit.corejs.javascript.Scriptable start)
Scriptable.NOT_FOUND if the index is invalid.
get in interface org.htmlunit.corejs.javascript.Scriptableget in class org.htmlunit.corejs.javascript.ScriptableObjectpublic Object get(String name, org.htmlunit.corejs.javascript.Scriptable start)
HtmlUnitScriptable.getWithPreemption(String).
get in interface org.htmlunit.corejs.javascript.Scriptableget in class HtmlUnitScriptablepublic HtmlUnitScriptable getNamedItemWithoutSytheticClassAttr(String name)
name - attribute namenull if the attribute is not definedgetNamedItem(String)public HtmlUnitScriptable getNamedItem(String name)
name - attribute namenull if the attribute is not definedpublic Node getNamedItemNS(String namespaceURI, String localName)
namespaceURI - the namespace URI of the node to retrieve.localName - the local name of the node to retrieve.null if the attribute is not definedpublic void setNamedItem(Node node)
node - the attributepublic void setNamedItemNS(Node node)
node - the attributepublic void removeNamedItem(String name)
name - the name of the item to removepublic Attr removeNamedItemNS(String namespaceURI, String localName)
namespaceURI - the namespace URI of the node to retrieve.localName - the local name of the node to retrieve.null if the attribute is not definedpublic HtmlUnitScriptable item(int index)
index - the indexpublic int getLength()
public boolean has(int index,
org.htmlunit.corejs.javascript.Scriptable start)
has in interface org.htmlunit.corejs.javascript.Scriptablehas in class HtmlUnitScriptablepublic org.htmlunit.corejs.javascript.Scriptable iterator()
Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.