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.css.CSSRuleList
- All Implemented Interfaces:
Serializable,Cloneable,org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.debug.DebuggableObject,org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable,org.htmlunit.corejs.javascript.SymbolScriptable
A JavaScript object for
CSSRuleList.- Author:
- Ahmed Ashour, Ronald Brill, Frank Danek
- See Also:
-
Nested Class Summary
Nested 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, LEGACY_CONST, PERMANENT, READONLY, STRICTLY_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 a new instance.CSSRuleList(CSSGroupingRule groupingRule) Creates a new instance.CSSRuleList(CSSStyleSheet stylesheet) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds a rule.protected voidClears the list of rules.get(int index, org.htmlunit.corejs.javascript.Scriptable start) protected Object[]getIds(org.htmlunit.corejs.javascript.CompoundOperationMap<org.htmlunit.corejs.javascript.Scriptable> map, boolean getNonEnumerable, boolean getSymbols) Overridden to enumerateitembeforelength(the properties of the prototype) if required by the browser.protected intReturns the number of indexed properties (0tocount - 1) this object exposes as own properties.intReturns the length of this list.booleanhas(int index, org.htmlunit.corejs.javascript.Scriptable start) boolean.item(int index) Returns the item in the given index.voidCreates an instance.Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, createDOMException, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getOwnPropertyDescriptor, getPrototype, getScriptableFor, getWindow, getWindow, getWindowOrWorkerGlobalScope, getWithPreemption, hasInstance, isIndexedPropertyWritable, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setupPromise, setupRejectedPromiseMethods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkPropertyDefinition, checkSlotRemoval, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, getAllIds, getAncestor, getArrayPrototype, getClassPrototype, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getParentScope, getProperty, 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, createSlotMap, defineProperty, defineProperty, get, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getIds, has, isSealed, readMaps, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, writeMapsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.htmlunit.corejs.javascript.Scriptable
get, getIds, hasMethods inherited from interface org.htmlunit.corejs.javascript.SymbolScriptable
get, has
-
Constructor Details
-
CSSRuleList
public CSSRuleList()Creates a new instance. -
CSSRuleList
Creates a new instance.- Parameters:
stylesheet- the stylesheet
-
CSSRuleList
Creates a new instance.- Parameters:
groupingRule- the grouping rule
-
-
Method Details
-
jsConstructor
public void jsConstructor()Creates an instance. -
addRule
Adds a rule.- Parameters:
rule- the rule to add
-
clearRules
protected void clearRules()Clears the list of rules. -
getLength
public int getLength()Returns the length of this list.- Returns:
- the length of this list.
-
item
Returns the item in the given index.- Parameters:
index- the index- Returns:
- the item in the given index
-
has
public boolean has(int index, org.htmlunit.corejs.javascript.Scriptable start) - Specified by:
hasin interfaceorg.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>- Specified by:
hasin interfaceorg.htmlunit.corejs.javascript.Scriptable- Overrides:
hasin classHtmlUnitScriptable
-
has
.- Specified by:
hasin interfaceorg.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>- Specified by:
hasin interfaceorg.htmlunit.corejs.javascript.Scriptable- Overrides:
hasin classorg.htmlunit.corejs.javascript.ScriptableObject
-
getIds
protected Object[] getIds(org.htmlunit.corejs.javascript.CompoundOperationMap<org.htmlunit.corejs.javascript.Scriptable> map, boolean getNonEnumerable, boolean getSymbols) Overridden to enumerateitembeforelength(the properties of the prototype) if required by the browser. Overridden to list the indexed properties (seeHtmlUnitScriptable.getIndexedPropertyCount()) in front of the other own properties.- Overrides:
getIdsin classHtmlUnitScriptable
-
getIndexedPropertyCount
protected int getIndexedPropertyCount()Returns the number of indexed properties (0tocount - 1) this object exposes as own properties. Host objects supporting indexed properties (e.g. DOMTokenList) override this; the indexed properties are then listed by Object.keys(), Object.getOwnPropertyNames(), for...in and have a property descriptor. The default implementation returns0.- Overrides:
getIndexedPropertyCountin classHtmlUnitScriptable- Returns:
- the number of indexed own properties
-
get
- Specified by:
getin interfaceorg.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>- Specified by:
getin interfaceorg.htmlunit.corejs.javascript.Scriptable- Overrides:
getin classorg.htmlunit.corejs.javascript.ScriptableObject
-