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_CONSTFields 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 thebackgroundAttachmentstyle attribute.Gets thebackgroundColorstyle attribute.Gets thebackgroundImagestyle attribute.Gets thebackgroundPositionstyle attribute.Gets thebackgroundRepeatstyle attribute.Gets theborderBottomColorstyle attribute.Gets theborderBottomStylestyle attribute.Gets theborderBottomWidthstyle attribute.Gets theborderLeftColorstyle attribute.Gets theborderLeftStylestyle attribute.Gets theborderLeftWidthstyle attribute.Gets theborderRightColorstyle attribute.Gets theborderRightStylestyle attribute.Gets theborderRightWidthstyle attribute.Gets theborderTopColorstyle attribute.Gets theborderTopStylestyle attribute.Gets theborderTopWidthstyle attribute.Gets thebottomstyle attribute.getColor()Gets thecolorstyle attribute.Gets thecssFloatstyle attribute.protected ComputedCssStyleDeclarationGets thedisplaystyle attribute.getFont()Gets thefontstyle attribute.Gets thefontFamilystyle attribute.Gets thefontSizestyle attribute.Gets theheightstyle attribute.getLeft()Gets theleftstyle attribute.Gets theletterSpacingstyle attribute.Gets thelineHeightstyle attribute.Gets themarginstyle attribute.Gets themarginBottomstyle attribute.Gets themarginLeftstyle attribute.Gets themarginRightstyle attribute.Gets themarginTopstyle attribute.Gets themaxHeightstyle attribute.Gets themaxWidthstyle attribute.Gets theminHeightstyle attribute.Gets theminWidthstyle attribute.Gets theopacitystyle attribute.Gets theorphansstyle attribute.Gets theoutlineWidthstyle attribute.Gets thepaddingstyle attribute.Gets thepaddingBottomstyle attribute.Gets thepaddingLeftstyle attribute.Gets thepaddingRightstyle attribute.Gets thepaddingTopstyle attribute.Gets thepositionstyle attribute.getPropertyValue(String name) Gets the value of the specified property of the style.getRight()Gets therightstyle attribute.Gets thetextIndentstyle attribute.getTop()Gets thetopstyle attribute.Gets theverticalAlignstyle attribute.Gets thewidowsstyle attribute.Gets thewordSpacingstyle attribute.Gets thezIndexstyle attribute.voidJavaScript constructor.protected voidsetStyleAttribute(String name, String newValue) Sets the specified style attribute.org.htmlunit.corejs.javascript.Scriptablevalues()Returns an Iterator allowing to go through all keys contained in this object.Methods inherited from class 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, toStringMethods inherited from class HtmlUnitScriptable
clone, equivalentValues, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromiseMethods 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
-
-
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- theComputedCssStyleDeclarationthis is base on
-
-
Method Details
-
jsConstructor
public void jsConstructor()JavaScript constructor. -
getCssStyleDeclaration
- Overrides:
getCssStyleDeclarationin 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:
valuesin classCSSStyleDeclaration- Returns:
- a NativeArrayIterator
-
setStyleAttribute
Sets the specified style attribute. This method does nothing as the object is read-only.- Overrides:
setStyleAttributein classCSSStyleDeclaration- Parameters:
name- the attribute name (camel-cased)newValue- the attribute value
-
getBackgroundAttachment
Gets thebackgroundAttachmentstyle attribute.- Overrides:
getBackgroundAttachmentin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBackgroundColor
Gets thebackgroundColorstyle attribute.- Overrides:
getBackgroundColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBackgroundImage
Gets thebackgroundImagestyle attribute.- Overrides:
getBackgroundImagein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBackgroundPosition
Gets thebackgroundPositionstyle attribute.- Overrides:
getBackgroundPositionin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBackgroundRepeat
Gets thebackgroundRepeatstyle attribute.- Overrides:
getBackgroundRepeatin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderBottomColor
Gets theborderBottomColorstyle attribute.- Overrides:
getBorderBottomColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderBottomStyle
Gets theborderBottomStylestyle attribute.- Overrides:
getBorderBottomStylein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderBottomWidth
Gets theborderBottomWidthstyle attribute.- Overrides:
getBorderBottomWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderLeftColor
Gets theborderLeftColorstyle attribute.- Overrides:
getBorderLeftColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderLeftStyle
Gets theborderLeftStylestyle attribute.- Overrides:
getBorderLeftStylein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderLeftWidth
Gets theborderLeftWidthstyle attribute.- Overrides:
getBorderLeftWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderRightColor
Gets theborderRightColorstyle attribute.- Overrides:
getBorderRightColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderRightStyle
Gets theborderRightStylestyle attribute.- Overrides:
getBorderRightStylein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderRightWidth
Gets theborderRightWidthstyle attribute.- Overrides:
getBorderRightWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderTopColor
Gets theborderTopColorstyle attribute.- Overrides:
getBorderTopColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderTopStyle
Gets theborderTopStylestyle attribute.- Overrides:
getBorderTopStylein classCSSStyleDeclaration- Returns:
- the style attribute
-
getBorderTopWidth
Gets theborderTopWidthstyle attribute.- Overrides:
getBorderTopWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getBottom
Gets thebottomstyle attribute.- Overrides:
getBottomin classCSSStyleDeclaration- Returns:
- the style attribute
-
getColor
Gets thecolorstyle attribute.- Overrides:
getColorin classCSSStyleDeclaration- Returns:
- the style attribute
-
getCssFloat
Gets thecssFloatstyle attribute.- Overrides:
getCssFloatin classCSSStyleDeclaration- Returns:
- the style attribute
-
getDisplay
Gets thedisplaystyle attribute.- Overrides:
getDisplayin classCSSStyleDeclaration- Returns:
- the style attribute
-
getFont
Gets thefontstyle attribute.- Overrides:
getFontin classCSSStyleDeclaration- Returns:
- the style attribute
-
getFontFamily
Gets thefontFamilystyle attribute.- Overrides:
getFontFamilyin classCSSStyleDeclaration- Returns:
- the style attribute
-
getFontSize
Gets thefontSizestyle attribute.- Overrides:
getFontSizein classCSSStyleDeclaration- Returns:
- the style attribute
-
getLineHeight
Gets thelineHeightstyle attribute.- Overrides:
getLineHeightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getHeight
Gets theheightstyle attribute.- Overrides:
getHeightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getLeft
Gets theleftstyle attribute.- Overrides:
getLeftin classCSSStyleDeclaration- Returns:
- the style attribute
-
getLetterSpacing
Gets theletterSpacingstyle attribute.- Overrides:
getLetterSpacingin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMargin
Gets themarginstyle attribute.- Overrides:
getMarginin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMarginBottom
Gets themarginBottomstyle attribute.- Overrides:
getMarginBottomin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMarginLeft
Gets themarginLeftstyle attribute.- Overrides:
getMarginLeftin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMarginRight
Gets themarginRightstyle attribute.- Overrides:
getMarginRightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMarginTop
Gets themarginTopstyle attribute.- Overrides:
getMarginTopin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMaxHeight
Gets themaxHeightstyle attribute.- Overrides:
getMaxHeightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMaxWidth
Gets themaxWidthstyle attribute.- Overrides:
getMaxWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMinHeight
Gets theminHeightstyle attribute.- Overrides:
getMinHeightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getMinWidth
Gets theminWidthstyle attribute.- Overrides:
getMinWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getOpacity
Gets theopacitystyle attribute.- Overrides:
getOpacityin classCSSStyleDeclaration- Returns:
- the style attribute
-
getOutlineWidth
Gets theoutlineWidthstyle attribute.- Overrides:
getOutlineWidthin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPadding
Gets thepaddingstyle attribute.- Overrides:
getPaddingin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPaddingBottom
Gets thepaddingBottomstyle attribute.- Overrides:
getPaddingBottomin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPaddingLeft
Gets thepaddingLeftstyle attribute.- Overrides:
getPaddingLeftin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPaddingRight
Gets thepaddingRightstyle attribute.- Overrides:
getPaddingRightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPaddingTop
Gets thepaddingTopstyle attribute.- Overrides:
getPaddingTopin classCSSStyleDeclaration- Returns:
- the style attribute
-
getRight
Gets therightstyle attribute.- Overrides:
getRightin classCSSStyleDeclaration- Returns:
- the style attribute
-
getTextIndent
Gets thetextIndentstyle attribute.- Overrides:
getTextIndentin classCSSStyleDeclaration- Returns:
- the style attribute
-
getTop
Gets thetopstyle attribute.- Overrides:
getTopin classCSSStyleDeclaration- Returns:
- the style attribute
-
getVerticalAlign
Gets theverticalAlignstyle attribute.- Overrides:
getVerticalAlignin classCSSStyleDeclaration- Returns:
- the style attribute
-
getWidows
Gets thewidowsstyle attribute.- Overrides:
getWidowsin classCSSStyleDeclaration- Returns:
- the style attribute
-
getOrphans
Gets theorphansstyle attribute.- Overrides:
getOrphansin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPosition
Gets thepositionstyle attribute.- Overrides:
getPositionin classCSSStyleDeclaration- Returns:
- the style attribute
-
getWordSpacing
Gets thewordSpacingstyle attribute.- Overrides:
getWordSpacingin classCSSStyleDeclaration- Returns:
- the style attribute
-
getZIndex
Gets thezIndexstyle attribute.- Overrides:
getZIndexin classCSSStyleDeclaration- Returns:
- the style attribute
-
getPropertyValue
Gets the value of the specified property of the style.- Overrides:
getPropertyValuein classCSSStyleDeclaration- Parameters:
name- the style property name- Returns:
- empty string if nothing found
-