WD-DOM-Level-2-19990304
Appendix E: ECMA Script Language Binding
This appendix contains the complete ECMA Script binding for the Level 2
Document Object Model definitions. The definitions are divided into
Stylesheets
,
CSS
,
Events
,
Filters and Iterators
, and
Range
.
E.1: Document Object Model Level 2 Stylesheets
- Object StyleSheet
-
- The StyleSheet object has the following properties:
- type
-
This property is of type String.
- disabled
-
This property is of type boolean.
- owningNode
-
This property is of type Node.
- parentStyleSheet
-
This property is of type StyleSheet.
- href
-
This property is of type String.
- title
-
This property is of type String.
- media
-
This property is of type String.
- Object StyleSheetCollection
-
- The StyleSheetCollection object has the following properties:
- length
-
This property is of type int.
- The StyleSheetCollection object has the following methods:
- item(index)
- This method returns a StyleSheet.
The index parameter is of type unsigned long.
E.2: Document Object Model Level 2 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:
- cssRules
-
This property is of type CSSRuleCollection.
- The CSSStyleSheet object has the following methods:
- insertRule(rule, index)
- This method returns a unsigned long.
The rule parameter is of type DOMString.
The index parameter is of type unsigned long.
- deleteRule(index)
- This method returns a void.
The index parameter is of type unsigned long.
- Object CSSRuleCollection
-
- The CSSRuleCollection object has the following properties:
- length
-
This property is of type int.
- The CSSRuleCollection object has the following methods:
- item(index)
- This method returns a CSSRule.
The index parameter is of type unsigned long.
- Object CSSRule
-
- The CSSRule object has the following properties:
- type
-
This property is of type short.
- cssText
-
This property is of type String.
- parentStyleSheet
-
This property is of type CSSStyleSheet.
- parentRule
-
This 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.
- style
-
This 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:
- mediaTypes
-
This property is of type String.
- cssRules
-
This property is of type CSSRuleCollection.
- The CSSMediaRule object has the following methods:
- insertRule(rule, index)
- This method returns a unsigned long.
The rule parameter is of type DOMString.
The index parameter is of type unsigned long.
- deleteRule(index)
- This method returns a void.
The index parameter is of type unsigned long.
- 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 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.
- style
-
This 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 property is of type String.
- media
-
This property is of type String.
- styleSheet
-
This property is of type CSSStyleSheet.
- 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.
- length
-
This property is of type int.
- parentRule
-
This property is of type CSSRule.
- The CSSStyleDeclaration object has the following methods:
- getPropertyValue(propertyName)
- This method returns a DOMString.
The propertyName parameter is of type DOMString.
- removeProperty(propertyName)
- This method returns a DOMString.
The propertyName parameter is of type DOMString.
- getPropertyPriority(propertyName)
- This method returns a DOMString.
The propertyName parameter is of type DOMString.
- setProperty(propertyName, value, priority)
- This method returns a void.
The propertyName parameter is of type DOMString.
The value parameter is of type DOMString.
The priority parameter is of type DOMString.
- item(index)
- This method returns a DOMString.
The index parameter is of type unsigned long.
- Object CSS2Properties
-
- The CSS2Properties object has the following properties:
- azimuth
-
This property is of type String.
- background
-
This property is of type String.
- backgroundAttachment
-
This property is of type String.
- backgroundColor
-
This property is of type String.
- backgroundImage
-
This property is of type String.
- backgroundPosition
-
This property is of type String.
- backgroundRepeat
-
This property is of type String.
- border
-
This property is of type String.
- borderCollapse
-
This property is of type String.
- borderColor
-
This property is of type String.
- borderSpacing
-
This property is of type String.
- borderStyle
-
This property is of type String.
- borderTop
-
This property is of type String.
- borderRight
-
This property is of type String.
- borderBottom
-
This property is of type String.
- borderLeft
-
This property is of type String.
- borderTopColor
-
This property is of type String.
- borderRightColor
-
This property is of type String.
- borderBottomColor
-
This property is of type String.
- borderLeftColor
-
This property is of type String.
- borderTopStyle
-
This property is of type String.
- borderRightStyle
-
This property is of type String.
- borderBottomStyle
-
This property is of type String.
- borderLeftStyle
-
This property is of type String.
- borderTopWidth
-
This property is of type String.
- borderRightWidth
-
This property is of type String.
- borderBottomWidth
-
This property is of type String.
- borderLeftWidth
-
This property is of type String.
- borderWidth
-
This property is of type String.
- bottom
-
This property is of type String.
- captionSide
-
This property is of type String.
- clear
-
This property is of type String.
- clip
-
This property is of type String.
- color
-
This property is of type String.
- content
-
This property is of type String.
- counterIncrement
-
This property is of type String.
- counterReset
-
This property is of type String.
- cue
-
This property is of type String.
- cueAfter
-
This property is of type String.
- cueBefore
-
This property is of type String.
- cursor
-
This property is of type String.
- direction
-
This property is of type String.
- display
-
This property is of type String.
- elevation
-
This property is of type String.
- emptyCells
-
This property is of type String.
- cssFloat
-
This property is of type String.
- font
-
This property is of type String.
- fontFamily
-
This property is of type String.
- fontSize
-
This property is of type String.
- fontSizeAdjust
-
This property is of type String.
- fontStretch
-
This property is of type String.
- fontStyle
-
This property is of type String.
- fontVariant
-
This property is of type String.
- fontWeight
-
This property is of type String.
- height
-
This property is of type String.
- left
-
This property is of type String.
- letterSpacing
-
This property is of type String.
- lineHeight
-
This property is of type String.
- listStyle
-
This property is of type String.
- listStyleImage
-
This property is of type String.
- listStylePosition
-
This property is of type String.
- listStyleType
-
This property is of type String.
- margin
-
This property is of type String.
- marginTop
-
This property is of type String.
- marginRight
-
This property is of type String.
- marginBottom
-
This property is of type String.
- marginLeft
-
This property is of type String.
- markerOffset
-
This property is of type String.
- marks
-
This property is of type String.
- maxHeight
-
This property is of type String.
- maxWidth
-
This property is of type String.
- minHeight
-
This property is of type String.
- minWidth
-
This property is of type String.
- orphans
-
This property is of type String.
- outline
-
This property is of type String.
- outlineColor
-
This property is of type String.
- outlineStyle
-
This property is of type String.
- outlineWidth
-
This property is of type String.
- overflow
-
This property is of type String.
- padding
-
This property is of type String.
- paddingTop
-
This property is of type String.
- paddingRight
-
This property is of type String.
- paddingBottom
-
This property is of type String.
- paddingLeft
-
This property is of type String.
- page
-
This property is of type String.
- pageBreakAfter
-
This property is of type String.
- pageBreakBefore
-
This property is of type String.
- pageBreakInside
-
This property is of type String.
- pause
-
This property is of type String.
- pauseAfter
-
This property is of type String.
- pauseBefore
-
This property is of type String.
- pitch
-
This property is of type String.
- pitchRange
-
This property is of type String.
- playDuring
-
This property is of type String.
- position
-
This property is of type String.
- quotes
-
This property is of type String.
- richness
-
This property is of type String.
- right
-
This property is of type String.
- size
-
This property is of type String.
- speak
-
This property is of type String.
- speakHeader
-
This property is of type String.
- speakNumeral
-
This property is of type String.
- speakPunctuation
-
This property is of type String.
- speechRate
-
This property is of type String.
- stress
-
This property is of type String.
- tableLayout
-
This property is of type String.
- textAlign
-
This property is of type String.
- textDecoration
-
This property is of type String.
- textIndent
-
This property is of type String.
- textShadow
-
This property is of type String.
- textTransform
-
This property is of type String.
- top
-
This property is of type String.
- unicodeBidi
-
This property is of type String.
- verticalAlign
-
This property is of type String.
- visibility
-
This property is of type String.
- voiceFamily
-
This property is of type String.
- volume
-
This property is of type String.
- whiteSpace
-
This property is of type String.
- widows
-
This property is of type String.
- width
-
This property is of type String.
- wordSpacing
-
This property is of type String.
- zIndex
-
This property is of type String.
E.3: Document Object Model Level 2 Events
- Object EventTarget
-
- The EventTarget object has the following methods:
- addEventListener(type, postProcess, useCapture, listener)
- This method returns a void.
The type parameter is of type DOMString.
The postProcess parameter is of type boolean.
The useCapture parameter is of type boolean.
The listener parameter is of type EventListener.
- removeEventListener(type, postProcess, useCapture, listener)
- This method returns a void.
The type parameter is of type DOMString.
The postProcess parameter is of type boolean.
The useCapture parameter is of type boolean.
The listener parameter is of type EventListener.
- Object EventListener
-
- The EventListener object has the following methods:
- handleEvent(event)
- This method returns a void.
The event parameter is of type Event.
- Object Event
-
- The Event object has the following properties:
- type
-
This property is of type String.
- target
-
This property is of type Node.
- currentNode
-
This property is of type Node.
- cancelBubble
-
This property is of type boolean.
- cancelCapture
-
This property is of type boolean.
- returnValue
-
This property is of type boolean.
- Object UIEvent
-
- UIEvent has the all the properties and methods of Event as well as the properties and methods defined below.
- The UIEvent object has the following properties:
- screenX
-
This property is of type long.
- screenY
-
This property is of type long.
- clientX
-
This property is of type long.
- clientY
-
This property is of type long.
- altKey
-
This property is of type boolean.
- ctrlKey
-
This property is of type boolean.
- shiftKey
-
This property is of type boolean.
- keyCode
-
This property is of type int.
- charCode
-
This property is of type int.
- button
-
This property is of type short.
- Object MutationEvent
-
- MutationEvent has the all the properties and methods of Event as well as the properties and methods defined below.
- The MutationEvent object has the following properties:
- relatedNode
-
This property is of type Node.
- prevValue
-
This property is of type String.
- newValue
-
This property is of type String.
- attrName
-
This property is of type String.
E.4: Document Object Model Level 2 Filters and Iterators
- Object NodeIterator
-
- The NodeIterator object has the following methods:
- nextNode()
- This method returns a Node.
- prevNode()
- This method returns a Node.
- Object Document
-
- The Document object has the following methods:
- createTreeIterator(root, whatToShow)
- This method returns a boolean.
The root parameter is of type Node.
The whatToShow parameter is of type short.
- Object NodeFilter
-
- The NodeFilter object has the following methods:
- acceptNode(n)
- This method returns a boolean.
The n parameter is of type Node.
E.5: Document Object Model Level 2 Range
- Object Range
-
- The Range object has the following properties:
- startParent
-
This property is of type Node.
- startOffset
-
This property is of type long.
- endParent
-
This property is of type Node.
- endOffset
-
This property is of type long.
- isCollapsed
-
This property is of type boolean.
- commonParent
-
This property is of type Node.
- The Range object has the following methods:
- setStart(parent, offset)
- This method returns a void.
The parent parameter is of type Node.
The offset parameter is of type long.
- setEnd(parent, offset)
- This method returns a void.
The parent parameter is of type Node.
The offset parameter is of type long.
- setStartBefore(sibling)
- This method returns a void.
The sibling parameter is of type Node.
- setStartAfter(sibling)
- This method returns a void.
The sibling parameter is of type Node.
- setEndBefore(sibling)
- This method returns a void.
The sibling parameter is of type Node.
- setEndAfter(sibling)
- This method returns a void.
The sibling parameter is of type Node.
- collapse(toStart)
- This method returns a void.
The toStart parameter is of type boolean.
- selectNode(n)
- This method returns a void.
The n parameter is of type Node.
- selectNodeContents(n)
- This method returns a void.
The n parameter is of type Node.
- compareEndPoints(how, sourceRange)
- This method returns a short.
The how parameter is of type CompareHow.
The sourceRange parameter is of type Range.
- deleteContents()
- This method returns a void.
- extractContents()
- This method returns a DocumentFragment.
- cloneContents()
- This method returns a DocumentFragment.
- insertNode(n)
- This method returns a void.
The n parameter is of type Node.
- surroundContents(n)
- This method returns a void.
The n parameter is of type Node.
- cloneRange()
- This method returns a Range.
- toString()
- This method returns a DOMString.