Package org.htmlunit.javascript.host.css
Class ComputedCSSStyleDeclaration
java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.css.CSSStyleDeclaration
org.htmlunit.javascript.host.css.ComputedCSSStyleDeclaration
- All Implemented Interfaces:
Serializable
,Cloneable
,org.htmlunit.corejs.javascript.ConstProperties
,org.htmlunit.corejs.javascript.debug.DebuggableObject
,org.htmlunit.corejs.javascript.Scriptable
,org.htmlunit.corejs.javascript.SymbolScriptable
An object for a CSSStyleDeclaration, which is computed.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
-
Field Summary
FieldsFields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance.ComputedCSSStyleDeclaration
(Element element, ComputedCssStyleDeclaration cssStyleDeclaration) Creates an instance. -
Method Summary
Modifier and TypeMethodDescriptionGets thebackgroundAttachment
style attribute.Gets thebackgroundColor
style attribute.Gets thebackgroundImage
style attribute.Gets thebackgroundPosition
style attribute.Gets thebackgroundRepeat
style attribute.Gets theborderBottomColor
style attribute.Gets theborderBottomStyle
style attribute.Gets theborderBottomWidth
style attribute.Gets theborderLeftColor
style attribute.Gets theborderLeftStyle
style attribute.Gets theborderLeftWidth
style attribute.Gets theborderRightColor
style attribute.Gets theborderRightStyle
style attribute.Gets theborderRightWidth
style attribute.Gets theborderTopColor
style attribute.Gets theborderTopStyle
style attribute.Gets theborderTopWidth
style attribute.Gets thebottom
style attribute.getColor()
Gets thecolor
style attribute.Gets thecssFloat
style attribute.protected ComputedCssStyleDeclaration
Gets thedisplay
style attribute.getFont()
Gets thefont
style attribute.Gets thefontFamily
style attribute.Gets thefontSize
style attribute.Gets theheight
style attribute.getLeft()
Gets theleft
style attribute.Gets theletterSpacing
style attribute.Gets thelineHeight
style attribute.Gets themargin
style attribute.Gets themarginBottom
style attribute.Gets themarginLeft
style attribute.Gets themarginRight
style attribute.Gets themarginTop
style attribute.Gets themaxHeight
style attribute.Gets themaxWidth
style attribute.Gets theminHeight
style attribute.Gets theminWidth
style attribute.Gets theopacity
style attribute.Gets theorphans
style attribute.Gets theoutlineWidth
style attribute.Gets thepadding
style attribute.Gets thepaddingBottom
style attribute.Gets thepaddingLeft
style attribute.Gets thepaddingRight
style attribute.Gets thepaddingTop
style attribute.Gets theposition
style attribute.getPropertyValue
(String name) Gets the value of the specified property of the style.getRight()
Gets theright
style attribute.Gets thetextIndent
style attribute.getTop()
Gets thetop
style attribute.Gets theverticalAlign
style attribute.Gets thewidows
style attribute.Gets thewordSpacing
style attribute.Gets thezIndex
style attribute.void
JavaScript constructor.protected void
setStyleAttribute
(String name, String newValue) Sets the specified style attribute.org.htmlunit.corejs.javascript.Scriptable
values()
Returns an Iterator allowing to go through all keys contained in this object.Methods inherited from class org.htmlunit.javascript.host.css.CSSStyleDeclaration
get, get, getBorderTop, getCssText, getIds, getLength, getOutline, getParentRule, getPropertyPriority, getRubyAlign, getSize, getStyleAttribute, getStyleAttribute, getStylePriority, getWidth, has, isLength, item, jsConstructor, put, removeProperty, setBackgroundAttachment, setBackgroundColor, setBackgroundImage, setBackgroundPosition, setBackgroundRepeat, setBorderBottomColor, setBorderBottomStyle, setBorderBottomWidth, setBorderLeftColor, setBorderLeftStyle, setBorderLeftWidth, setBorderRightColor, setBorderRightStyle, setBorderRightWidth, setBorderTop, setBorderTopColor, setBorderTopStyle, setBorderTopWidth, setBottom, setColor, setCssFloat, setCssText, setDisplay, setFont, setFontFamily, setFontSize, setHeight, setLeft, setLetterSpacing, setLineHeight, setMargin, setMarginBottom, setMarginLeft, setMarginRight, setMarginTop, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setOpacity, setOrphans, setOutline, setOutlineWidth, setPadding, setPaddingBottom, setPaddingLeft, setPaddingRight, setPaddingTop, setParentRule, setPosition, setProperty, setRight, setRubyAlign, setSize, setStyleAttribute, setTextIndent, setTop, setVerticalAlign, setWidows, setWidth, setWordSpacing, setZIndex, toString
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, 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, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, 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, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
Field Details
-
TO_STRING_TAG
Symbol.toStringTag support.- See Also:
-
-
Constructor Details
-
ComputedCSSStyleDeclaration
public ComputedCSSStyleDeclaration()Creates an instance. -
ComputedCSSStyleDeclaration
public ComputedCSSStyleDeclaration(Element element, ComputedCssStyleDeclaration cssStyleDeclaration) Creates an instance.- Parameters:
element
- the element this belongs tocssStyleDeclaration
- theComputedCssStyleDeclaration
this is base on
-
-
Method Details
-
jsConstructor
public void jsConstructor()JavaScript constructor. -
getCssStyleDeclaration
- Overrides:
getCssStyleDeclaration
in classCSSStyleDeclaration
-
values
public org.htmlunit.corejs.javascript.Scriptable values()Returns an Iterator allowing to go through all keys contained in this object. This method does nothing as the object is read-only.- Overrides:
values
in classCSSStyleDeclaration
- Returns:
- a NativeArrayIterator
-
setStyleAttribute
Sets the specified style attribute. This method does nothing as the object is read-only.- Overrides:
setStyleAttribute
in classCSSStyleDeclaration
- Parameters:
name
- the attribute name (camel-cased)newValue
- the attribute value
-
getBackgroundAttachment
Gets thebackgroundAttachment
style attribute.- Overrides:
getBackgroundAttachment
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBackgroundColor
Gets thebackgroundColor
style attribute.- Overrides:
getBackgroundColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBackgroundImage
Gets thebackgroundImage
style attribute.- Overrides:
getBackgroundImage
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBackgroundPosition
Gets thebackgroundPosition
style attribute.- Overrides:
getBackgroundPosition
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBackgroundRepeat
Gets thebackgroundRepeat
style attribute.- Overrides:
getBackgroundRepeat
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderBottomColor
Gets theborderBottomColor
style attribute.- Overrides:
getBorderBottomColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderBottomStyle
Gets theborderBottomStyle
style attribute.- Overrides:
getBorderBottomStyle
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderBottomWidth
Gets theborderBottomWidth
style attribute.- Overrides:
getBorderBottomWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderLeftColor
Gets theborderLeftColor
style attribute.- Overrides:
getBorderLeftColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderLeftStyle
Gets theborderLeftStyle
style attribute.- Overrides:
getBorderLeftStyle
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderLeftWidth
Gets theborderLeftWidth
style attribute.- Overrides:
getBorderLeftWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderRightColor
Gets theborderRightColor
style attribute.- Overrides:
getBorderRightColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderRightStyle
Gets theborderRightStyle
style attribute.- Overrides:
getBorderRightStyle
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderRightWidth
Gets theborderRightWidth
style attribute.- Overrides:
getBorderRightWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderTopColor
Gets theborderTopColor
style attribute.- Overrides:
getBorderTopColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderTopStyle
Gets theborderTopStyle
style attribute.- Overrides:
getBorderTopStyle
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBorderTopWidth
Gets theborderTopWidth
style attribute.- Overrides:
getBorderTopWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getBottom
Gets thebottom
style attribute.- Overrides:
getBottom
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getColor
Gets thecolor
style attribute.- Overrides:
getColor
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getCssFloat
Gets thecssFloat
style attribute.- Overrides:
getCssFloat
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getDisplay
Gets thedisplay
style attribute.- Overrides:
getDisplay
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getFont
Gets thefont
style attribute.- Overrides:
getFont
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getFontFamily
Gets thefontFamily
style attribute.- Overrides:
getFontFamily
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getFontSize
Gets thefontSize
style attribute.- Overrides:
getFontSize
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getLineHeight
Gets thelineHeight
style attribute.- Overrides:
getLineHeight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getHeight
Gets theheight
style attribute.- Overrides:
getHeight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getLeft
Gets theleft
style attribute.- Overrides:
getLeft
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getLetterSpacing
Gets theletterSpacing
style attribute.- Overrides:
getLetterSpacing
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMargin
Gets themargin
style attribute.- Overrides:
getMargin
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMarginBottom
Gets themarginBottom
style attribute.- Overrides:
getMarginBottom
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMarginLeft
Gets themarginLeft
style attribute.- Overrides:
getMarginLeft
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMarginRight
Gets themarginRight
style attribute.- Overrides:
getMarginRight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMarginTop
Gets themarginTop
style attribute.- Overrides:
getMarginTop
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMaxHeight
Gets themaxHeight
style attribute.- Overrides:
getMaxHeight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMaxWidth
Gets themaxWidth
style attribute.- Overrides:
getMaxWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMinHeight
Gets theminHeight
style attribute.- Overrides:
getMinHeight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getMinWidth
Gets theminWidth
style attribute.- Overrides:
getMinWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getOpacity
Gets theopacity
style attribute.- Overrides:
getOpacity
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getOutlineWidth
Gets theoutlineWidth
style attribute.- Overrides:
getOutlineWidth
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPadding
Gets thepadding
style attribute.- Overrides:
getPadding
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPaddingBottom
Gets thepaddingBottom
style attribute.- Overrides:
getPaddingBottom
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPaddingLeft
Gets thepaddingLeft
style attribute.- Overrides:
getPaddingLeft
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPaddingRight
Gets thepaddingRight
style attribute.- Overrides:
getPaddingRight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPaddingTop
Gets thepaddingTop
style attribute.- Overrides:
getPaddingTop
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getRight
Gets theright
style attribute.- Overrides:
getRight
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getTextIndent
Gets thetextIndent
style attribute.- Overrides:
getTextIndent
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getTop
Gets thetop
style attribute.- Overrides:
getTop
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getVerticalAlign
Gets theverticalAlign
style attribute.- Overrides:
getVerticalAlign
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getWidows
Gets thewidows
style attribute.- Overrides:
getWidows
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getOrphans
Gets theorphans
style attribute.- Overrides:
getOrphans
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPosition
Gets theposition
style attribute.- Overrides:
getPosition
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getWordSpacing
Gets thewordSpacing
style attribute.- Overrides:
getWordSpacing
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getZIndex
Gets thezIndex
style attribute.- Overrides:
getZIndex
in classCSSStyleDeclaration
- Returns:
- the style attribute
-
getPropertyValue
Gets the value of the specified property of the style.- Overrides:
getPropertyValue
in classCSSStyleDeclaration
- Parameters:
name
- the style property name- Returns:
- empty string if nothing found
-