27 September, 2000

Appendix C: ECMA Script Language Binding

This appendix contains the complete ECMA Script [ECMAScript] binding for the Level 2 Document Object Model Style definitions. The definitions are divided into StyleSheets and CSS.

Note: Exceptions handling is only supported by ECMAScript implementation compliant with the Standard ECMA-262 3rd. Edition ([ECMAScript]).

C.1: Document Object Model StyleSheets

Object StyleSheet
The StyleSheet object has the following properties:
type
This read-only property is of type String.
disabled
This property is of type boolean.
ownerNode
This read-only property is of type Node.
parentStyleSheet
This read-only property is of type StyleSheet.
href
This read-only property is of type String.
title
This read-only property is of type String.
media
This read-only property is of type MediaList.
Object StyleSheetList
The StyleSheetList object has the following properties:
length
This read-only property is of type int.
The StyleSheetList object has the following methods:
item(index)
This method returns a StyleSheet.
The index parameter is of type int.
Note: This object can also be dereferenced using square bracket notation (e.g. obj[1]). Dereferencing with an integer index is equivalent to invoking the item method with that index.
Object MediaList
The MediaList object has the following properties:
mediaText
This property is of type String and can raise a DOMException on setting.
length
This read-only property is of type int.
The MediaList object has the following methods:
item(index)
This method returns a String.
The index parameter is of type int.
Note: This object can also be dereferenced using square bracket notation (e.g. obj[1]). Dereferencing with an integer index is equivalent to invoking the item method with that index.
deleteMedium(oldMedium)
This method has no return value.
The oldMedium parameter is of type String.
This method can raise a DOMException.
appendMedium(newMedium)
This method has no return value.
The newMedium parameter is of type String.
This method can raise a DOMException.
Object LinkStyle
The LinkStyle object has the following properties:
sheet
This read-only property is of type StyleSheet.
Object DocumentStyle
The DocumentStyle object has the following properties:
styleSheets
This read-only property is of type StyleSheetList.

C.2: Document Object Model CSS

Object CSSStyleSheet
CSSStyleSheet has the all the properties and methods of StyleSheet as well as the properties and methods defined below.
The CSSStyleSheet object has the following properties:
ownerRule
This read-only property is of type CSSRule.
cssRules
This read-only property is of type CSSRuleList.
The CSSStyleSheet object has the following methods:
insertRule(rule, index)
This method returns a int.
The rule parameter is of type String.
The index parameter is of type int.
This method can raise a DOMException.
deleteRule(index)
This method has no return value.
The index parameter is of type int.
This method can raise a DOMException.
Object CSSRuleList
The CSSRuleList object has the following properties:
length
This read-only property is of type int.
The CSSRuleList object has the following methods:
item(index)
This method returns a CSSRule.
The index parameter is of type int.
Note: This object can also be dereferenced using square bracket notation (e.g. obj[1]). Dereferencing with an integer index is equivalent to invoking the item method with that index.
Class CSSRule
The CSSRule class has the following constants:
CSSRule.UNKNOWN_RULE
This constant is of type short and its value is 0.
CSSRule.STYLE_RULE
This constant is of type short and its value is 1.
CSSRule.CHARSET_RULE
This constant is of type short and its value is 2.
CSSRule.IMPORT_RULE
This constant is of type short and its value is 3.
CSSRule.MEDIA_RULE
This constant is of type short and its value is 4.
CSSRule.FONT_FACE_RULE
This constant is of type short and its value is 5.
CSSRule.PAGE_RULE
This constant is of type short and its value is 6.
Object CSSRule
The CSSRule object has the following properties:
type
This read-only property is of type short.
cssText
This property is of type String and can raise a DOMException on setting.
parentStyleSheet
This read-only property is of type CSSStyleSheet.
parentRule
This read-only property is of type CSSRule.
Object CSSStyleRule
CSSStyleRule has the all the properties and methods of CSSRule as well as the properties and methods defined below.
The CSSStyleRule object has the following properties:
selectorText
This property is of type String and can raise a DOMException on setting.
style
This read-only property is of type CSSStyleDeclaration.
Object CSSMediaRule
CSSMediaRule has the all the properties and methods of CSSRule as well as the properties and methods defined below.
The CSSMediaRule object has the following properties:
media
This read-only property is of type MediaList.
cssRules
This read-only property is of type CSSRuleList.
The CSSMediaRule object has the following methods:
insertRule(rule, index)
This method returns a int.
The rule parameter is of type String.
The index parameter is of type int.
This method can raise a DOMException.
deleteRule(index)
This method has no return value.
The index parameter is of type int.
This method can raise a DOMException.
Object CSSFontFaceRule
CSSFontFaceRule has the all the properties and methods of CSSRule as well as the properties and methods defined below.
The CSSFontFaceRule object has the following properties:
style
This read-only property is of type CSSStyleDeclaration.
Object CSSPageRule
CSSPageRule has the all the properties and methods of CSSRule as well as the properties and methods defined below.
The CSSPageRule object has the following properties:
selectorText
This property is of type String and can raise a DOMException on setting.
style
This read-only property is of type CSSStyleDeclaration.
Object CSSImportRule
CSSImportRule has the all the properties and methods of CSSRule as well as the properties and methods defined below.
The CSSImportRule object has the following properties:
href
This read-only property is of type String.
media
This read-only property is of type MediaList.
styleSheet
This read-only property is of type CSSStyleSheet.
Object CSSCharsetRule
CSSCharsetRule has the all the properties and methods of CSSRule as well as the properties and methods defined below.
The CSSCharsetRule object has the following properties:
encoding
This property is of type String and can raise a DOMException on setting.
Object CSSUnknownRule
CSSUnknownRule has the all the properties and methods of CSSRule as well as the properties and methods defined below.
Object CSSStyleDeclaration
The CSSStyleDeclaration object has the following properties:
cssText
This property is of type String and can raise a DOMException on setting.
length
This read-only property is of type int.
parentRule
This read-only property is of type CSSRule.
The CSSStyleDeclaration object has the following methods:
getPropertyValue(propertyName)
This method returns a String.
The propertyName parameter is of type String.
getPropertyCSSValue(propertyName)
This method returns a CSSValue.
The propertyName parameter is of type String.
removeProperty(propertyName)
This method returns a String.
The propertyName parameter is of type String.
This method can raise a DOMException.
getPropertyPriority(propertyName)
This method returns a String.
The propertyName parameter is of type String.
setProperty(propertyName, value, priority)
This method has no return value.
The propertyName parameter is of type String.
The value parameter is of type String.
The priority parameter is of type String.
This method can raise a DOMException.
item(index)
This method returns a String.
The index parameter is of type int.
Note: This object can also be dereferenced using square bracket notation (e.g. obj[1]). Dereferencing with an integer index is equivalent to invoking the item method with that index.
Class CSSValue
The CSSValue class has the following constants:
CSSValue.CSS_INHERIT
This constant is of type short and its value is 0.
CSSValue.CSS_PRIMITIVE_VALUE
This constant is of type short and its value is 1.
CSSValue.CSS_VALUE_LIST
This constant is of type short and its value is 2.
CSSValue.CSS_CUSTOM
This constant is of type short and its value is 3.
Object CSSValue
The CSSValue object has the following properties:
cssText
This property is of type String and can raise a DOMException on setting.
cssValueType
This read-only property is of type short.
Class CSSPrimitiveValue
The CSSPrimitiveValue class has the following constants:
CSSPrimitiveValue.CSS_UNKNOWN
This constant is of type short and its value is 0.
CSSPrimitiveValue.CSS_NUMBER
This constant is of type short and its value is 1.
CSSPrimitiveValue.CSS_PERCENTAGE
This constant is of type short and its value is 2.
CSSPrimitiveValue.CSS_EMS
This constant is of type short and its value is 3.
CSSPrimitiveValue.CSS_EXS
This constant is of type short and its value is 4.
CSSPrimitiveValue.CSS_PX
This constant is of type short and its value is 5.
CSSPrimitiveValue.CSS_CM
This constant is of type short and its value is 6.
CSSPrimitiveValue.CSS_MM
This constant is of type short and its value is 7.
CSSPrimitiveValue.CSS_IN
This constant is of type short and its value is 8.
CSSPrimitiveValue.CSS_PT
This constant is of type short and its value is 9.
CSSPrimitiveValue.CSS_PC
This constant is of type short and its value is 10.
CSSPrimitiveValue.CSS_DEG
This constant is of type short and its value is 11.
CSSPrimitiveValue.CSS_RAD
This constant is of type short and its value is 12.
CSSPrimitiveValue.CSS_GRAD
This constant is of type short and its value is 13.
CSSPrimitiveValue.CSS_MS
This constant is of type short and its value is 14.
CSSPrimitiveValue.CSS_S
This constant is of type short and its value is 15.
CSSPrimitiveValue.CSS_HZ
This constant is of type short and its value is 16.
CSSPrimitiveValue.CSS_KHZ
This constant is of type short and its value is 17.
CSSPrimitiveValue.CSS_DIMENSION
This constant is of type short and its value is 18.
CSSPrimitiveValue.CSS_STRING
This constant is of type short and its value is 19.
CSSPrimitiveValue.CSS_URI
This constant is of type short and its value is 20.
CSSPrimitiveValue.CSS_IDENT
This constant is of type short and its value is 21.
CSSPrimitiveValue.CSS_ATTR
This constant is of type short and its value is 22.
CSSPrimitiveValue.CSS_COUNTER
This constant is of type short and its value is 23.
CSSPrimitiveValue.CSS_RECT
This constant is of type short and its value is 24.
CSSPrimitiveValue.CSS_RGBCOLOR
This constant is of type short and its value is 25.
Object CSSPrimitiveValue
CSSPrimitiveValue has the all the properties and methods of CSSValue as well as the properties and methods defined below.
The CSSPrimitiveValue object has the following properties:
primitiveType
This read-only property is of type short.
The CSSPrimitiveValue object has the following methods:
setFloatValue(unitType, floatValue)
This method has no return value.
The unitType parameter is of type short.
The floatValue parameter is of type float.
This method can raise a DOMException.
getFloatValue(unitType)
This method returns a float.
The unitType parameter is of type short.
This method can raise a DOMException.
setStringValue(stringType, stringValue)
This method has no return value.
The stringType parameter is of type short.
The stringValue parameter is of type String.
This method can raise a DOMException.
getStringValue()
This method returns a String.
This method can raise a DOMException.
getCounterValue()
This method returns a Counter.
This method can raise a DOMException.
getRectValue()
This method returns a Rect.
This method can raise a DOMException.
getRGBColorValue()
This method returns a RGBColor.
This method can raise a DOMException.
Object CSSValueList
CSSValueList has the all the properties and methods of CSSValue as well as the properties and methods defined below.
The CSSValueList object has the following properties:
length
This read-only property is of type int.
The CSSValueList object has the following methods:
item(index)
This method returns a CSSValue.
The index parameter is of type int.
Note: This object can also be dereferenced using square bracket notation (e.g. obj[1]). Dereferencing with an integer index is equivalent to invoking the item method with that index.
Object RGBColor
The RGBColor object has the following properties:
red
This read-only property is of type CSSPrimitiveValue.
green
This read-only property is of type CSSPrimitiveValue.
blue
This read-only property is of type CSSPrimitiveValue.
Object Rect
The Rect object has the following properties:
top
This read-only property is of type CSSPrimitiveValue.
right
This read-only property is of type CSSPrimitiveValue.
bottom
This read-only property is of type CSSPrimitiveValue.
left
This read-only property is of type CSSPrimitiveValue.
Object Counter
The Counter object has the following properties:
identifier
This read-only property is of type String.
listStyle
This read-only property is of type String.
separator
This read-only property is of type String.
Object ViewCSS
ViewCSS has the all the properties and methods of AbstractView as well as the properties and methods defined below.
The ViewCSS object has the following methods:
getComputedStyle(elt, pseudoElt)
This method returns a CSSStyleDeclaration.
The elt parameter is of type Element.
The pseudoElt parameter is of type String.
Object DocumentCSS
DocumentCSS has the all the properties and methods of DocumentStyle as well as the properties and methods defined below.
The DocumentCSS object has the following methods:
getOverrideStyle(elt, pseudoElt)
This method returns a CSSStyleDeclaration.
The elt parameter is of type Element.
The pseudoElt parameter is of type String.
Object DOMImplementationCSS
DOMImplementationCSS has the all the properties and methods of DOMImplementation as well as the properties and methods defined below.
The DOMImplementationCSS object has the following methods:
createCSSStyleSheet(title, media)
This method returns a CSSStyleSheet.
The title parameter is of type String.
The media parameter is of type String.
This method can raise a DOMException.
Object ElementCSSInlineStyle
The ElementCSSInlineStyle object has the following properties:
style
This read-only property is of type CSSStyleDeclaration.
Object CSS2Properties
The CSS2Properties object has the following properties:
azimuth
This property is of type String and can raise a DOMException on setting.
background
This property is of type String and can raise a DOMException on setting.
backgroundAttachment
This property is of type String and can raise a DOMException on setting.
backgroundColor
This property is of type String and can raise a DOMException on setting.
backgroundImage
This property is of type String and can raise a DOMException on setting.
backgroundPosition
This property is of type String and can raise a DOMException on setting.
backgroundRepeat
This property is of type String and can raise a DOMException on setting.
border
This property is of type String and can raise a DOMException on setting.
borderCollapse
This property is of type String and can raise a DOMException on setting.
borderColor
This property is of type String and can raise a DOMException on setting.
borderSpacing
This property is of type String and can raise a DOMException on setting.
borderStyle
This property is of type String and can raise a DOMException on setting.
borderTop
This property is of type String and can raise a DOMException on setting.
borderRight
This property is of type String and can raise a DOMException on setting.
borderBottom
This property is of type String and can raise a DOMException on setting.
borderLeft
This property is of type String and can raise a DOMException on setting.
borderTopColor
This property is of type String and can raise a DOMException on setting.
borderRightColor
This property is of type String and can raise a DOMException on setting.
borderBottomColor
This property is of type String and can raise a DOMException on setting.
borderLeftColor
This property is of type String and can raise a DOMException on setting.
borderTopStyle
This property is of type String and can raise a DOMException on setting.
borderRightStyle
This property is of type String and can raise a DOMException on setting.
borderBottomStyle
This property is of type String and can raise a DOMException on setting.
borderLeftStyle
This property is of type String and can raise a DOMException on setting.
borderTopWidth
This property is of type String and can raise a DOMException on setting.
borderRightWidth
This property is of type String and can raise a DOMException on setting.
borderBottomWidth
This property is of type String and can raise a DOMException on setting.
borderLeftWidth
This property is of type String and can raise a DOMException on setting.
borderWidth
This property is of type String and can raise a DOMException on setting.
bottom
This property is of type String and can raise a DOMException on setting.
captionSide
This property is of type String and can raise a DOMException on setting.
clear
This property is of type String and can raise a DOMException on setting.
clip
This property is of type String and can raise a DOMException on setting.
color
This property is of type String and can raise a DOMException on setting.
content
This property is of type String and can raise a DOMException on setting.
counterIncrement
This property is of type String and can raise a DOMException on setting.
counterReset
This property is of type String and can raise a DOMException on setting.
cue
This property is of type String and can raise a DOMException on setting.
cueAfter
This property is of type String and can raise a DOMException on setting.
cueBefore
This property is of type String and can raise a DOMException on setting.
cursor
This property is of type String and can raise a DOMException on setting.
direction
This property is of type String and can raise a DOMException on setting.
display
This property is of type String and can raise a DOMException on setting.
elevation
This property is of type String and can raise a DOMException on setting.
emptyCells
This property is of type String and can raise a DOMException on setting.
cssFloat
This property is of type String and can raise a DOMException on setting.
font
This property is of type String and can raise a DOMException on setting.
fontFamily
This property is of type String and can raise a DOMException on setting.
fontSize
This property is of type String and can raise a DOMException on setting.
fontSizeAdjust
This property is of type String and can raise a DOMException on setting.
fontStretch
This property is of type String and can raise a DOMException on setting.
fontStyle
This property is of type String and can raise a DOMException on setting.
fontVariant
This property is of type String and can raise a DOMException on setting.
fontWeight
This property is of type String and can raise a DOMException on setting.
height
This property is of type String and can raise a DOMException on setting.
left
This property is of type String and can raise a DOMException on setting.
letterSpacing
This property is of type String and can raise a DOMException on setting.
lineHeight
This property is of type String and can raise a DOMException on setting.
listStyle
This property is of type String and can raise a DOMException on setting.
listStyleImage
This property is of type String and can raise a DOMException on setting.
listStylePosition
This property is of type String and can raise a DOMException on setting.
listStyleType
This property is of type String and can raise a DOMException on setting.
margin
This property is of type String and can raise a DOMException on setting.
marginTop
This property is of type String and can raise a DOMException on setting.
marginRight
This property is of type String and can raise a DOMException on setting.
marginBottom
This property is of type String and can raise a DOMException on setting.
marginLeft
This property is of type String and can raise a DOMException on setting.
markerOffset
This property is of type String and can raise a DOMException on setting.
marks
This property is of type String and can raise a DOMException on setting.
maxHeight
This property is of type String and can raise a DOMException on setting.
maxWidth
This property is of type String and can raise a DOMException on setting.
minHeight
This property is of type String and can raise a DOMException on setting.
minWidth
This property is of type String and can raise a DOMException on setting.
orphans
This property is of type String and can raise a DOMException on setting.
outline
This property is of type String and can raise a DOMException on setting.
outlineColor
This property is of type String and can raise a DOMException on setting.
outlineStyle
This property is of type String and can raise a DOMException on setting.
outlineWidth
This property is of type String and can raise a DOMException on setting.
overflow
This property is of type String and can raise a DOMException on setting.
padding
This property is of type String and can raise a DOMException on setting.
paddingTop
This property is of type String and can raise a DOMException on setting.
paddingRight
This property is of type String and can raise a DOMException on setting.
paddingBottom
This property is of type String and can raise a DOMException on setting.
paddingLeft
This property is of type String and can raise a DOMException on setting.
page
This property is of type String and can raise a DOMException on setting.
pageBreakAfter
This property is of type String and can raise a DOMException on setting.
pageBreakBefore
This property is of type String and can raise a DOMException on setting.
pageBreakInside
This property is of type String and can raise a DOMException on setting.
pause
This property is of type String and can raise a DOMException on setting.
pauseAfter
This property is of type String and can raise a DOMException on setting.
pauseBefore
This property is of type String and can raise a DOMException on setting.
pitch
This property is of type String and can raise a DOMException on setting.
pitchRange
This property is of type String and can raise a DOMException on setting.
playDuring
This property is of type String and can raise a DOMException on setting.
position
This property is of type String and can raise a DOMException on setting.
quotes
This property is of type String and can raise a DOMException on setting.
richness
This property is of type String and can raise a DOMException on setting.
right
This property is of type String and can raise a DOMException on setting.
size
This property is of type String and can raise a DOMException on setting.
speak
This property is of type String and can raise a DOMException on setting.
speakHeader
This property is of type String and can raise a DOMException on setting.
speakNumeral
This property is of type String and can raise a DOMException on setting.
speakPunctuation
This property is of type String and can raise a DOMException on setting.
speechRate
This property is of type String and can raise a DOMException on setting.
stress
This property is of type String and can raise a DOMException on setting.
tableLayout
This property is of type String and can raise a DOMException on setting.
textAlign
This property is of type String and can raise a DOMException on setting.
textDecoration
This property is of type String and can raise a DOMException on setting.
textIndent
This property is of type String and can raise a DOMException on setting.
textShadow
This property is of type String and can raise a DOMException on setting.
textTransform
This property is of type String and can raise a DOMException on setting.
top
This property is of type String and can raise a DOMException on setting.
unicodeBidi
This property is of type String and can raise a DOMException on setting.
verticalAlign
This property is of type String and can raise a DOMException on setting.
visibility
This property is of type String and can raise a DOMException on setting.
voiceFamily
This property is of type String and can raise a DOMException on setting.
volume
This property is of type String and can raise a DOMException on setting.
whiteSpace
This property is of type String and can raise a DOMException on setting.
widows
This property is of type String and can raise a DOMException on setting.
width
This property is of type String and can raise a DOMException on setting.
wordSpacing
This property is of type String and can raise a DOMException on setting.
zIndex
This property is of type String and can raise a DOMException on setting.