public class NamedNodeMap extends HtmlUnitScriptable
HtmlElement
,
but case-sensitive when used with a DomElement
.org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
NOT_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, setupRejectedPromise
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, 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, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
public 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.Scriptable
get
in class org.htmlunit.corejs.javascript.ScriptableObject
public Object get(String name, org.htmlunit.corejs.javascript.Scriptable start)
HtmlUnitScriptable.getWithPreemption(String)
.
get
in interface org.htmlunit.corejs.javascript.Scriptable
get
in class HtmlUnitScriptable
public 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.Scriptable
has
in class HtmlUnitScriptable
public org.htmlunit.corejs.javascript.Scriptable iterator()
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.