public class XMLDOMNodeList extends MSXMLScriptable implements net.sourceforge.htmlunit.corejs.javascript.Function, NodeList
| Modifier and Type | Class and Description |
|---|---|
protected static class |
XMLDOMNodeList.EffectOnCache
Cache effect of some changes.
|
| Modifier | Constructor and Description |
|---|---|
|
XMLDOMNodeList()
Creates an instance.
|
|
XMLDOMNodeList(DomNode parentScope,
boolean attributeChangeSensitive,
String description)
Creates an instance.
|
protected |
XMLDOMNodeList(DomNode parentScope,
List<DomNode> initialElements)
Constructs an instance with an initial cache value.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addElementIds(List<String> idList,
List<DomNode> elements)
Adds the ids of the collection's elements to the idList.
|
Object |
call(net.sourceforge.htmlunit.corejs.javascript.Context cx,
net.sourceforge.htmlunit.corejs.javascript.Scriptable scope,
net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args) |
protected List<DomNode> |
computeElements()
Returns the elements whose associated host objects are available through this collection.
|
net.sourceforge.htmlunit.corejs.javascript.Scriptable |
construct(net.sourceforge.htmlunit.corejs.javascript.Context cx,
net.sourceforge.htmlunit.corejs.javascript.Scriptable scope,
Object[] args) |
static XMLDOMNodeList |
emptyCollection(MSXMLScriptable parentScope)
Gets an empty collection.
|
protected Object |
equivalentValues(Object other)
Called for the js "==".
|
Object |
get(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
Returns the element at the specified index, or
Scriptable.NOT_FOUND if the index is invalid. |
protected Iterable<DomNode> |
getCandidates()
Gets the DOM node that have to be examined to see if they are matching.
|
protected XMLDOMNodeList.EffectOnCache |
getEffectOnCache(HtmlAttributeChangeEvent event)
Gets the effect of the change on an attribute of the reference node
on this collection's cache.
|
protected List<DomNode> |
getElements()
Gets the HTML elements from cache or retrieve them at first call.
|
Object[] |
getIds()
.
|
int |
getLength() |
protected net.sourceforge.htmlunit.corejs.javascript.Scriptable |
getScriptableForElement(Object object)
Gets the scriptable for the provided element that may already be the right scriptable.
|
protected Object |
getWithPreemption(String name)
Returns the element or elements that match the specified key.
|
boolean |
has(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start) |
boolean |
has(String name,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start) |
protected boolean |
isMatching(DomNode node)
Indicates if the node should belong to the collection.
|
Node |
item(int index) |
Object |
item(Object index)
Allows random access to individual nodes within the collection.
|
Object |
nextNode()
Returns the next node in the collection.
|
void |
reset()
Resets the iterator accessed via
nextNode(). |
String |
toString() |
getClassName, getEnvironment, getPrototype, isReadOnlySettable, makeScriptableFor, setEnvironment, setParentScopeclone, get, getBrowserVersion, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getScriptableFor, getStartingScope, getWindow, getWindow, hasInstance, initParentScope, setCaseSensitive, setDomNode, setDomNode, setHtmlElementdefineFunctionProperties, defineProperty, put, setClassNameapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, sizepublic XMLDOMNodeList()
public XMLDOMNodeList(DomNode parentScope, boolean attributeChangeSensitive, String description)
parentScope - parent scopeattributeChangeSensitive - indicates if the content of the collection may change when an attribute
of a descendant node of parentScope changes (attribute added, modified or removed)description - a text useful for debuggingpublic final Object item(Object index)
index - the index of the item within the collection; the first item is zeropublic Object nextNode()
public void reset()
nextNode().public static XMLDOMNodeList emptyCollection(MSXMLScriptable parentScope)
parentScope - the current scopepublic final net.sourceforge.htmlunit.corejs.javascript.Scriptable construct(net.sourceforge.htmlunit.corejs.javascript.Context cx,
net.sourceforge.htmlunit.corejs.javascript.Scriptable scope,
Object[] args)
construct in interface net.sourceforge.htmlunit.corejs.javascript.Functionpublic Object call(net.sourceforge.htmlunit.corejs.javascript.Context cx, net.sourceforge.htmlunit.corejs.javascript.Scriptable scope, net.sourceforge.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args)
call in interface net.sourceforge.htmlunit.corejs.javascript.Callablecall in interface net.sourceforge.htmlunit.corejs.javascript.Functionpublic final Object get(int index, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
Scriptable.NOT_FOUND if the index is invalid.
get in interface net.sourceforge.htmlunit.corejs.javascript.Scriptableget in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObjectprotected List<DomNode> getElements()
HtmlElement contained in this collectionprotected List<DomNode> computeElements()
protected Iterable<DomNode> getCandidates()
protected boolean isMatching(DomNode node)
node - the node to test. Will be a child node of the reference node.false here as subclasses for concrete collections should decide it.protected Object getWithPreemption(String name)
Scriptable.NOT_FOUND is returned.
Called by SimpleScriptable.get(String, Scriptable) to allow retrieval of the property before the prototype
chain is searched.
IMPORTANT: This method is invoked *very* often by Rhino. If you override this method, the implementation needs to be as fast as possible!
getWithPreemption in class SimpleScriptablename - the property nameScriptable.NOT_FOUND if not foundprotected Object equivalentValues(Object other)
equivalentValues in class SimpleScriptablepublic boolean has(int index,
net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
has in interface net.sourceforge.htmlunit.corejs.javascript.Scriptablehas in class SimpleScriptablepublic boolean has(String name, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
has in interface net.sourceforge.htmlunit.corejs.javascript.Scriptablehas in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObjectpublic Object[] getIds()
getIds in interface net.sourceforge.htmlunit.corejs.javascript.ScriptablegetIds in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObjectprotected void addElementIds(List<String> idList, List<DomNode> elements)
idList - the list to add the ids toelements - the collection's elementsprotected XMLDOMNodeList.EffectOnCache getEffectOnCache(HtmlAttributeChangeEvent event)
event - the change eventprotected net.sourceforge.htmlunit.corejs.javascript.Scriptable getScriptableForElement(Object object)
object - the object for which to get the scriptableCopyright © 2002–2020 Gargoyle Software Inc.. All rights reserved.