13 November, 2000

Appendix C: ECMAScript Language Binding

This appendix contains the complete ECMAScript [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 conformant 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 a Node object.
parentStyleSheet
This read-only property is a StyleSheet object.
href
This read-only property is of type String.
title
This read-only property is of type String.
media
This read-only property is a MediaList object.
Object StyleSheetList
The StyleSheetList object has the following properties:
length
This read-only property is of type Number.
The StyleSheetList object has the following methods:
item(index)
This method returns a StyleSheet object.
The index parameter is of type Number.
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 object on setting.
length
This read-only property is of type Number.
The MediaList object has the following methods:
item(index)
This method returns a String.
The index parameter is of type Number.
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 object.
appendMedium(newMedium)
This method has no return value.
The newMedium parameter is of type String.
This method can raise a DOMException object.
Object LinkStyle
The LinkStyle object has the following properties:
sheet
This read-only property is a StyleSheet object.
Object DocumentStyle
The DocumentStyle object has the following properties:
styleSheets
This read-only property is a StyleSheetList object.

C.2: Document Object Model CSS

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