java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<org.htmlunit.corejs.javascript.Scriptable>
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.dom.AbstractList
org.htmlunit.javascript.host.html.HTMLAllCollection
- All Implemented Interfaces:
Serializable,Cloneable,org.htmlunit.corejs.javascript.Callable,org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.debug.DebuggableObject,org.htmlunit.corejs.javascript.ExternalArrayData,org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable,org.htmlunit.corejs.javascript.SymbolScriptable
public class HTMLAllCollection
extends AbstractList
implements org.htmlunit.corejs.javascript.Callable
A special
HTMLCollection for document.all.- Author:
- Ronald Brill, Ahmed Ashour
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.javascript.host.dom.AbstractList
AbstractList.EffectOnCacheNested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunction -
Field Summary
Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from class org.htmlunit.corejs.javascript.SlotMapOwner
isSealedFields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance.HTMLAllCollection(DomNode parentScope) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptioncall(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args) protected HTMLCollectionConstructs a new instance with an initial cache value.protected ObjectequivalentValues(Object value) Called for the js "==".final intReturns the length.protected ObjectgetWithPreemptionByName(String name, List<DomNode> elements) Helper forAbstractList.getWithPreemption(String)when finding by id doesn't get results.protected booleanReturns whetherAbstractList.getWithPreemption(String)should search by name or not.Returns the item or items corresponding to the specified index or key.org.htmlunit.corejs.javascript.Scriptableiterator()voidJavaScript constructor.final org.htmlunit.corejs.javascript.ScriptableRetrieves the item or items corresponding to the specified name (checks ids, and if that does not work, then names).Methods inherited from class org.htmlunit.javascript.host.dom.AbstractList
avoidObjectDetection, defineProperty, getArrayElement, getArrayLength, getElements, getElementSupplier, getIsMatchingPredicate, getIt, getScriptableForElement, getWithPreemption, setArrayElement, setAvoidObjectDetection, setDomNode, setEffectOnCacheFunction, setElementsSupplier, setIsMatchingPredicate, toStringMethods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getWindow, getWindow, getWindowOrWorkerGlobalScope, has, hasInstance, makeScriptableFor, put, setClassName, setDomNode, setupPromise, setupRejectedPromiseMethods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkPropertyDefinition, checkSlotRemoval, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, get, getAllIds, getAncestor, getArrayPrototype, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getThis, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasProperty, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isTrue, preventExtensions, put, put, putConst, putConstProperty, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, redefineProperty, sameValue, sealObject, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizeMethods inherited from class org.htmlunit.corejs.javascript.SlotMapOwner
associateValue, checkNotSealed, copyAssociatedValue, createSlotMap, defineProperty, defineProperty, get, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getIds, has, has, isSealed, readMaps, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, writeMapsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.htmlunit.corejs.javascript.Scriptable
get, getIds, has, hasMethods inherited from interface org.htmlunit.corejs.javascript.SymbolScriptable
get, has
-
Constructor Details
-
HTMLAllCollection
public HTMLAllCollection()Creates an instance. -
HTMLAllCollection
Creates an instance.- Parameters:
parentScope- parent scope
-
-
Method Details
-
jsConstructor
public void jsConstructor()JavaScript constructor. -
item
Returns the item or items corresponding to the specified index or key.- Parameters:
index- the index or key corresponding to the element or elements to return- Returns:
- the element or elements corresponding to the specified index or key
- See Also:
-
namedItem
Retrieves the item or items corresponding to the specified name (checks ids, and if that does not work, then names).- Parameters:
name- the name or id the element or elements to return- Returns:
- the element or elements corresponding to the specified name or id
- See Also:
-
call
public Object call(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args) - Specified by:
callin interfaceorg.htmlunit.corejs.javascript.Callable
-
equivalentValues
Called for the js "==".- Overrides:
equivalentValuesin classAbstractList
-
iterator
public org.htmlunit.corejs.javascript.Scriptable iterator()- Returns:
- the Iterator symbol
-
getLength
public final int getLength()Returns the length.- Overrides:
getLengthin classAbstractList- Returns:
- the length
-
getWithPreemptionByName
Helper forAbstractList.getWithPreemption(String)when finding by id doesn't get results.- Overrides:
getWithPreemptionByNamein classAbstractList- Parameters:
name- the property nameelements- the children elements.- Returns:
Scriptable.NOT_FOUNDif not found
-
isGetWithPreemptionSearchName
protected boolean isGetWithPreemptionSearchName()Returns whetherAbstractList.getWithPreemption(String)should search by name or not.- Returns:
- whether
AbstractList.getWithPreemption(String)should search by name or not
-
create
Constructs a new instance with an initial cache value.- Overrides:
createin classAbstractList- Parameters:
parentScope- the parent scope, on which we listen for changesinitialElements- the initial content for the cache- Returns:
- the newly created instance
-