23 August 2001

Appendix D: ECMA Script Language Binding

This appendix contains the complete ECMA Script [ECMAScript] binding for the Level 3 Document Object Model Events definitions.

Object EventTarget
The EventTarget object has the following properties:
eventListeners
This read-only property is a EventListenerList object.
The EventTarget object has the following methods:
addEventListener(type, listener, useCapture)
This method has no return value.
The type parameter is of type String.
The listener parameter is a EventListener object.
The useCapture parameter is of type Boolean.
removeEventListener(type, listener, useCapture)
This method has no return value.
The type parameter is of type String.
The listener parameter is a EventListener object.
The useCapture parameter is of type Boolean.
dispatchEvent(evt)
This method returns a Boolean.
The evt parameter is a Event object.
This method can raise a EventException object.
Object EventListener
This is an ECMAScript function reference. This method has no return value. The parameter is a Event object.
Object EventListenerList
The EventListenerList object has the following properties:
length
This read-only property is of type Number.
The EventListenerList object has the following methods:
item(index)
This method returns a EventListener 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 EventGroup
The EventGroup object has the following methods:
isSameEventGroup(other)
This method returns a Boolean.
The other parameter is a EventGroup object.
Object EventTargetGroup
The EventTargetGroup object has the following methods:
addEventListener(type, listener, useCapture, evtGroup)
This method has no return value.
The type parameter is of type String.
The listener parameter is a EventListener object.
The useCapture parameter is of type Boolean.
The evtGroup parameter is a EventGroup object.
removeEventListener(type, listener, useCapture, evtGroup)
This method has no return value.
The type parameter is of type String.
The listener parameter is a EventListener object.
The useCapture parameter is of type Boolean.
The evtGroup parameter is a EventGroup object.
Object DocumentEventGroup
The DocumentEventGroup object has the following methods:
createEventGroup()
This method returns a EventGroup object.
Prototype Object Event
The Event class has the following constants:
Event.CAPTURING_PHASE
This constant is of type Number and its value is 1.
Event.AT_TARGET
This constant is of type Number and its value is 2.
Event.BUBBLING_PHASE
This constant is of type Number and its value is 3.
Object Event
The Event object has the following properties:
type
This read-only property is of type String.
target
This read-only property is a EventTarget object.
currentTarget
This read-only property is a EventTarget object.
eventPhase
This read-only property is of type Number.
bubbles
This read-only property is of type Boolean.
cancelable
This read-only property is of type Boolean.
timeStamp
This read-only property is a Date object.
The Event object has the following methods:
stopPropagation()
This method has no return value.
preventDefault()
This method has no return value.
initEvent(eventTypeArg, canBubbleArg, cancelableArg)
This method has no return value.
The eventTypeArg parameter is of type String.
The canBubbleArg parameter is of type Boolean.
The cancelableArg parameter is of type Boolean.
Prototype Object EventException
The EventException class has the following constants:
EventException.UNSPECIFIED_EVENT_TYPE_ERR
This constant is of type Number and its value is 0.
Object EventException
The EventException object has the following properties:
code
This property is of type Number.
Object DocumentEvent
The DocumentEvent object has the following methods:
createEvent(eventType)
This method returns a Event object.
The eventType parameter is of type String.
This method can raise a DOMException object.
Object UIEvent
UIEvent has the all the properties and methods of the Event object as well as the properties and methods defined below.
The UIEvent object has the following properties:
view
This read-only property is a AbstractView object.
detail
This read-only property is of type Number.
The UIEvent object has the following methods:
initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg)
This method has no return value.
The typeArg parameter is of type String.
The canBubbleArg parameter is of type Boolean.
The cancelableArg parameter is of type Boolean.
The viewArg parameter is a AbstractView object.
The detailArg parameter is of type Number.
Object MouseEvent
MouseEvent has the all the properties and methods of the UIEvent object as well as the properties and methods defined below.
The MouseEvent object has the following properties:
screenX
This read-only property is of type Number.
screenY
This read-only property is of type Number.
clientX
This read-only property is of type Number.
clientY
This read-only property is of type Number.
ctrlKey
This read-only property is of type Boolean.
shiftKey
This read-only property is of type Boolean.
altKey
This read-only property is of type Boolean.
metaKey
This read-only property is of type Boolean.
button
This read-only property is of type Number.
relatedTarget
This read-only property is a EventTarget object.
The MouseEvent object has the following methods:
initMouseEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg)
This method has no return value.
The typeArg parameter is of type String.
The canBubbleArg parameter is of type Boolean.
The cancelableArg parameter is of type Boolean.
The viewArg parameter is a AbstractView object.
The detailArg parameter is of type Number.
The screenXArg parameter is of type Number.
The screenYArg parameter is of type Number.
The clientXArg parameter is of type Number.
The clientYArg parameter is of type Number.
The ctrlKeyArg parameter is of type Boolean.
The altKeyArg parameter is of type Boolean.
The shiftKeyArg parameter is of type Boolean.
The metaKeyArg parameter is of type Boolean.
The buttonArg parameter is of type Number.
The relatedTargetArg parameter is a EventTarget object.
Prototype Object TextEvent
The TextEvent class has the following constants:
TextEvent.DOM_VK_UNDEFINED
This constant is of type Number and its value is 0x0.
TextEvent.DOM_VK_RIGHT_ALT
This constant is of type Number and its value is 0x01.
TextEvent.DOM_VK_LEFT_ALT
This constant is of type Number and its value is 0x02.
TextEvent.DOM_VK_LEFT_CONTROL
This constant is of type Number and its value is 0x03.
TextEvent.DOM_VK_RIGHT_CONTROL
This constant is of type Number and its value is 0x04.
TextEvent.DOM_VK_LEFT_SHIFT
This constant is of type Number and its value is 0x05.
TextEvent.DOM_VK_RIGHT_SHIFT
This constant is of type Number and its value is 0x06.
TextEvent.DOM_VK_LEFT_META
This constant is of type Number and its value is 0x07.
TextEvent.DOM_VK_RIGHT_META
This constant is of type Number and its value is 0x08.
TextEvent.DOM_VK_CAPS_LOCK
This constant is of type Number and its value is 0x09.
TextEvent.DOM_VK_DELETE
This constant is of type Number and its value is 0x0A.
TextEvent.DOM_VK_END
This constant is of type Number and its value is 0x0B.
TextEvent.DOM_VK_ENTER
This constant is of type Number and its value is 0x0C.
TextEvent.DOM_VK_ESCAPE
This constant is of type Number and its value is 0x0D.
TextEvent.DOM_VK_HOME
This constant is of type Number and its value is 0x0E.
TextEvent.DOM_VK_INSERT
This constant is of type Number and its value is 0x0F.
TextEvent.DOM_VK_NUM_LOCK
This constant is of type Number and its value is 0x10.
TextEvent.DOM_VK_PAUSE
This constant is of type Number and its value is 0x11.
TextEvent.DOM_VK_PRINTSCREEN
This constant is of type Number and its value is 0x12.
TextEvent.DOM_VK_SCROLL_LOCK
This constant is of type Number and its value is 0x13.
TextEvent.DOM_VK_LEFT
This constant is of type Number and its value is 0x14.
TextEvent.DOM_VK_RIGHT
This constant is of type Number and its value is 0x15.
TextEvent.DOM_VK_UP
This constant is of type Number and its value is 0x16.
TextEvent.DOM_VK_DOWN
This constant is of type Number and its value is 0x17.
TextEvent.DOM_VK_PAGE_DOWN
This constant is of type Number and its value is 0x18.
TextEvent.DOM_VK_PAGE_UP
This constant is of type Number and its value is 0x19.
TextEvent.DOM_VK_F1
This constant is of type Number and its value is 0x1A.
TextEvent.DOM_VK_F2
This constant is of type Number and its value is 0x1B.
TextEvent.DOM_VK_F3
This constant is of type Number and its value is 0x1C.
TextEvent.DOM_VK_F4
This constant is of type Number and its value is 0x1D.
TextEvent.DOM_VK_F5
This constant is of type Number and its value is 0x1E.
TextEvent.DOM_VK_F6
This constant is of type Number and its value is 0x1F.
TextEvent.DOM_VK_F7
This constant is of type Number and its value is 0x20.
TextEvent.DOM_VK_F8
This constant is of type Number and its value is 0x21.
TextEvent.DOM_VK_F9
This constant is of type Number and its value is 0x22.
TextEvent.DOM_VK_F10
This constant is of type Number and its value is 0x23.
TextEvent.DOM_VK_F11
This constant is of type Number and its value is 0x24.
TextEvent.DOM_VK_F12
This constant is of type Number and its value is 0x25.
TextEvent.DOM_VK_F13
This constant is of type Number and its value is 0x26.
TextEvent.DOM_VK_F14
This constant is of type Number and its value is 0x27.
TextEvent.DOM_VK_F15
This constant is of type Number and its value is 0x28.
TextEvent.DOM_VK_F16
This constant is of type Number and its value is 0x29.
TextEvent.DOM_VK_F17
This constant is of type Number and its value is 0x2A.
TextEvent.DOM_VK_F18
This constant is of type Number and its value is 0x2B.
TextEvent.DOM_VK_F19
This constant is of type Number and its value is 0x2C.
TextEvent.DOM_VK_F20
This constant is of type Number and its value is 0x2D.
TextEvent.DOM_VK_F21
This constant is of type Number and its value is 0x2E.
TextEvent.DOM_VK_F22
This constant is of type Number and its value is 0x2F.
TextEvent.DOM_VK_F23
This constant is of type Number and its value is 0x30.
TextEvent.DOM_VK_F24
This constant is of type Number and its value is 0x31.
Object TextEvent
TextEvent has the all the properties and methods of the UIEvent object as well as the properties and methods defined below.
The TextEvent object has the following properties:
outputString
This property is of type String.
keyVal
This property is of type Number.
virtKeyVal
This property is of type Number.
visibleOutputGenerated
This property is of type Boolean.
numPad
This property is of type Boolean.
The TextEvent object has the following methods:
checkModifier(modifer)
This method returns a Boolean.
The modifer parameter is of type Number.
initTextEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, outputStringArg, keyValArg, virtKeyValArg, visibleOutputGeneratedArg, numPadArg)
This method has no return value.
The typeArg parameter is of type String.
The canBubbleArg parameter is of type Boolean.
The cancelableArg parameter is of type Boolean.
The viewArg parameter is a AbstractView object.
The detailArg parameter is of type Number.
The outputStringArg parameter is of type String.
The keyValArg parameter is of type Number.
The virtKeyValArg parameter is of type Number.
The visibleOutputGeneratedArg parameter is of type Boolean.
The numPadArg parameter is of type Boolean.
initModifier(modifier, value)
This method has no return value.
The modifier parameter is of type Number.
The value parameter is of type Boolean.
Prototype Object MutationEvent
The MutationEvent class has the following constants:
MutationEvent.MODIFICATION
This constant is of type Number and its value is 1.
MutationEvent.ADDITION
This constant is of type Number and its value is 2.
MutationEvent.REMOVAL
This constant is of type Number and its value is 3.
Object MutationEvent
MutationEvent has the all the properties and methods of the Event object as well as the properties and methods defined below.
The MutationEvent object has the following properties:
relatedNode
This read-only property is a Node object.
prevValue
This read-only property is of type String.
newValue
This read-only property is of type String.
attrName
This read-only property is of type String.
attrChange
This read-only property is of type Number.
The MutationEvent object has the following methods:
initMutationEvent(typeArg, canBubbleArg, cancelableArg, relatedNodeArg, prevValueArg, newValueArg, attrNameArg, attrChangeArg)
This method has no return value.
The typeArg parameter is of type String.
The canBubbleArg parameter is of type Boolean.
The cancelableArg parameter is of type Boolean.
The relatedNodeArg parameter is a Node object.
The prevValueArg parameter is of type String.
The newValueArg parameter is of type String.
The attrNameArg parameter is of type String.
The attrChangeArg parameter is of type Number.