12 July 2002

Appendix D: ECMAScript Language Binding

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

Objects that implement the EventTarget interface:
Functions of objects that implement the EventTarget interface:
addEventListener(type, listener, useCapture)
This function has no return value.
The type parameter is a String.
The listener parameter is an object that implements the EventListener interface.
The useCapture parameter is a Boolean.
removeEventListener(type, listener, useCapture)
This function has no return value.
The type parameter is a String.
The listener parameter is an object that implements the EventListener interface.
The useCapture parameter is a Boolean.
dispatchEvent(evt)
This function returns a Boolean.
The evt parameter is an object that implements the Event interface.
This function can raise an object that implements the EventException interface.
addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup)
This function has no return value.
The namespaceURI parameter is a String.
The type parameter is a String.
The listener parameter is an object that implements the EventListener interface.
The useCapture parameter is a Boolean.
The evtGroup parameter is an object that implements the EventListenerGroup interface.
removeEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup)
This function has no return value.
The namespaceURI parameter is a String.
The type parameter is a String.
The listener parameter is an object that implements the EventListener interface.
The useCapture parameter is a Boolean.
The evtGroup parameter is an object that implements the EventListenerGroup interface.
canTriggerNS(namespaceURI, type)
This function returns a Boolean.
The namespaceURI parameter is a String.
The type parameter is a String.
isRegisteredHereNS(namespaceURI, type)
This function returns a Boolean.
The namespaceURI parameter is a String.
The type parameter is a String.
Objects that implement the EventListenerGroup interface:
Functions of objects that implement the EventListenerGroup interface:
isSameEventListenerGroup(other)
This function returns a Boolean.
The other parameter is an object that implements the EventListenerGroup interface.
EventListener function:
This function has no return value. The parameter is an object that implements the Event interface.
Properties of the Event Constructor function:
Event.CAPTURING_PHASE
The value of the constant Event.CAPTURING_PHASE is 1.
Event.AT_TARGET
The value of the constant Event.AT_TARGET is 2.
Event.BUBBLING_PHASE
The value of the constant Event.BUBBLING_PHASE is 3.
Objects that implement the Event interface:
Properties of objects that implement the Event interface:
type
This read-only property is a String.
target
This read-only property is an object that implements the EventTarget interface.
currentTarget
This read-only property is an object that implements the EventTarget interface.
eventPhase
This read-only property is a Number.
bubbles
This read-only property is a Boolean.
cancelable
This read-only property is a Boolean.
timeStamp
This read-only property is an object that implements the Date interface.
namespaceURI
This read-only property is a String.
Functions of objects that implement the Event interface:
stopPropagation()
This function has no return value.
preventDefault()
This function has no return value.
initEvent(eventTypeArg, canBubbleArg, cancelableArg)
This function has no return value.
The eventTypeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
initEventNS(namespaceURI, type, canBubbleArg, cancelableArg)
This function has no return value.
The namespaceURI parameter is a String.
The type parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
Properties of the EventException Constructor function:
EventException.UNSPECIFIED_EVENT_TYPE_ERR
The value of the constant EventException.UNSPECIFIED_EVENT_TYPE_ERR is 0.
Objects that implement the EventException interface:
Properties of objects that implement the EventException interface:
code
This property is a Number.
Objects that implement the DocumentEvent interface:
Functions of objects that implement the DocumentEvent interface:
createEvent(eventType)
This function returns an object that implements the Event interface.
The eventType parameter is a String.
This function can raise an object that implements the DOMException interface.
createEventListenerGroup()
This function returns an object that implements the EventListenerGroup interface.
Objects that implement the CustomEvent interface:
Objects that implement the CustomEvent interface have all properties and functions of the Event interface as well as the properties and functions defined below.
Functions of objects that implement the CustomEvent interface:
setCurrentTarget(target)
This function has no return value.
The target parameter is an object that implements the Node interface.
setEventPhase(phase)
This function has no return value.
The phase parameter is a Number.
Objects that implement the UIEvent interface:
Objects that implement the UIEvent interface have all properties and functions of the Event interface as well as the properties and functions defined below.
Properties of objects that implement the UIEvent interface:
view
This read-only property is an object that implements the AbstractView interface.
detail
This read-only property is a Number.
Functions of objects that implement the UIEvent interface:
initUIEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg)
This function has no return value.
The typeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The viewArg parameter is an object that implements the AbstractView interface.
The detailArg parameter is a Number.
initUIEventNS(namespaceURI, typeArg, canBubbleArg, cancelableArg, viewArg, detailArg)
This function has no return value.
The namespaceURI parameter is a String.
The typeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The viewArg parameter is an object that implements the AbstractView interface.
The detailArg parameter is a Number.
Objects that implement the MouseEvent interface:
Objects that implement the MouseEvent interface have all properties and functions of the UIEvent interface as well as the properties and functions defined below.
Properties of objects that implement the MouseEvent interface:
screenX
This read-only property is a Number.
screenY
This read-only property is a Number.
clientX
This read-only property is a Number.
clientY
This read-only property is a Number.
ctrlKey
This read-only property is a Boolean.
shiftKey
This read-only property is a Boolean.
altKey
This read-only property is a Boolean.
metaKey
This read-only property is a Boolean.
button
This read-only property is a Number.
relatedTarget
This read-only property is an object that implements the EventTarget interface.
Functions of objects that implement the MouseEvent interface:
initMouseEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg)
This function has no return value.
The typeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The viewArg parameter is an object that implements the AbstractView interface.
The detailArg parameter is a Number.
The screenXArg parameter is a Number.
The screenYArg parameter is a Number.
The clientXArg parameter is a Number.
The clientYArg parameter is a Number.
The ctrlKeyArg parameter is a Boolean.
The altKeyArg parameter is a Boolean.
The shiftKeyArg parameter is a Boolean.
The metaKeyArg parameter is a Boolean.
The buttonArg parameter is a Number.
The relatedTargetArg parameter is an object that implements the EventTarget interface.
initMouseEventNS(namespaceURI, typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg)
This function has no return value.
The namespaceURI parameter is a String.
The typeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The viewArg parameter is an object that implements the AbstractView interface.
The detailArg parameter is a Number.
The screenXArg parameter is a Number.
The screenYArg parameter is a Number.
The clientXArg parameter is a Number.
The clientYArg parameter is a Number.
The ctrlKeyArg parameter is a Boolean.
The altKeyArg parameter is a Boolean.
The shiftKeyArg parameter is a Boolean.
The metaKeyArg parameter is a Boolean.
The buttonArg parameter is a Number.
The relatedTargetArg parameter is an object that implements the EventTarget interface.
Properties of the TextEvent Constructor function:
TextEvent.DOM_VK_UNDEFINED
The value of the constant TextEvent.DOM_VK_UNDEFINED is 0x0.
TextEvent.DOM_VK_RIGHT_ALT
The value of the constant TextEvent.DOM_VK_RIGHT_ALT is 0x01.
TextEvent.DOM_VK_LEFT_ALT
The value of the constant TextEvent.DOM_VK_LEFT_ALT is 0x02.
TextEvent.DOM_VK_LEFT_CONTROL
The value of the constant TextEvent.DOM_VK_LEFT_CONTROL is 0x03.
TextEvent.DOM_VK_RIGHT_CONTROL
The value of the constant TextEvent.DOM_VK_RIGHT_CONTROL is 0x04.
TextEvent.DOM_VK_LEFT_SHIFT
The value of the constant TextEvent.DOM_VK_LEFT_SHIFT is 0x05.
TextEvent.DOM_VK_RIGHT_SHIFT
The value of the constant TextEvent.DOM_VK_RIGHT_SHIFT is 0x06.
TextEvent.DOM_VK_LEFT_META
The value of the constant TextEvent.DOM_VK_LEFT_META is 0x07.
TextEvent.DOM_VK_RIGHT_META
The value of the constant TextEvent.DOM_VK_RIGHT_META is 0x08.
TextEvent.DOM_VK_CAPS_LOCK
The value of the constant TextEvent.DOM_VK_CAPS_LOCK is 0x09.
TextEvent.DOM_VK_DELETE
The value of the constant TextEvent.DOM_VK_DELETE is 0x0A.
TextEvent.DOM_VK_END
The value of the constant TextEvent.DOM_VK_END is 0x0B.
TextEvent.DOM_VK_ENTER
The value of the constant TextEvent.DOM_VK_ENTER is 0x0C.
TextEvent.DOM_VK_ESCAPE
The value of the constant TextEvent.DOM_VK_ESCAPE is 0x0D.
TextEvent.DOM_VK_HOME
The value of the constant TextEvent.DOM_VK_HOME is 0x0E.
TextEvent.DOM_VK_INSERT
The value of the constant TextEvent.DOM_VK_INSERT is 0x0F.
TextEvent.DOM_VK_NUM_LOCK
The value of the constant TextEvent.DOM_VK_NUM_LOCK is 0x10.
TextEvent.DOM_VK_PAUSE
The value of the constant TextEvent.DOM_VK_PAUSE is 0x11.
TextEvent.DOM_VK_PRINTSCREEN
The value of the constant TextEvent.DOM_VK_PRINTSCREEN is 0x12.
TextEvent.DOM_VK_SCROLL_LOCK
The value of the constant TextEvent.DOM_VK_SCROLL_LOCK is 0x13.
TextEvent.DOM_VK_LEFT
The value of the constant TextEvent.DOM_VK_LEFT is 0x14.
TextEvent.DOM_VK_RIGHT
The value of the constant TextEvent.DOM_VK_RIGHT is 0x15.
TextEvent.DOM_VK_UP
The value of the constant TextEvent.DOM_VK_UP is 0x16.
TextEvent.DOM_VK_DOWN
The value of the constant TextEvent.DOM_VK_DOWN is 0x17.
TextEvent.DOM_VK_PAGE_DOWN
The value of the constant TextEvent.DOM_VK_PAGE_DOWN is 0x18.
TextEvent.DOM_VK_PAGE_UP
The value of the constant TextEvent.DOM_VK_PAGE_UP is 0x19.
TextEvent.DOM_VK_F1
The value of the constant TextEvent.DOM_VK_F1 is 0x1A.
TextEvent.DOM_VK_F2
The value of the constant TextEvent.DOM_VK_F2 is 0x1B.
TextEvent.DOM_VK_F3
The value of the constant TextEvent.DOM_VK_F3 is 0x1C.
TextEvent.DOM_VK_F4
The value of the constant TextEvent.DOM_VK_F4 is 0x1D.
TextEvent.DOM_VK_F5
The value of the constant TextEvent.DOM_VK_F5 is 0x1E.
TextEvent.DOM_VK_F6
The value of the constant TextEvent.DOM_VK_F6 is 0x1F.
TextEvent.DOM_VK_F7
The value of the constant TextEvent.DOM_VK_F7 is 0x20.
TextEvent.DOM_VK_F8
The value of the constant TextEvent.DOM_VK_F8 is 0x21.
TextEvent.DOM_VK_F9
The value of the constant TextEvent.DOM_VK_F9 is 0x22.
TextEvent.DOM_VK_F10
The value of the constant TextEvent.DOM_VK_F10 is 0x23.
TextEvent.DOM_VK_F11
The value of the constant TextEvent.DOM_VK_F11 is 0x24.
TextEvent.DOM_VK_F12
The value of the constant TextEvent.DOM_VK_F12 is 0x25.
TextEvent.DOM_VK_F13
The value of the constant TextEvent.DOM_VK_F13 is 0x26.
TextEvent.DOM_VK_F14
The value of the constant TextEvent.DOM_VK_F14 is 0x27.
TextEvent.DOM_VK_F15
The value of the constant TextEvent.DOM_VK_F15 is 0x28.
TextEvent.DOM_VK_F16
The value of the constant TextEvent.DOM_VK_F16 is 0x29.
TextEvent.DOM_VK_F17
The value of the constant TextEvent.DOM_VK_F17 is 0x2A.
TextEvent.DOM_VK_F18
The value of the constant TextEvent.DOM_VK_F18 is 0x2B.
TextEvent.DOM_VK_F19
The value of the constant TextEvent.DOM_VK_F19 is 0x2C.
TextEvent.DOM_VK_F20
The value of the constant TextEvent.DOM_VK_F20 is 0x2D.
TextEvent.DOM_VK_F21
The value of the constant TextEvent.DOM_VK_F21 is 0x2E.
TextEvent.DOM_VK_F22
The value of the constant TextEvent.DOM_VK_F22 is 0x2F.
TextEvent.DOM_VK_F23
The value of the constant TextEvent.DOM_VK_F23 is 0x30.
TextEvent.DOM_VK_F24
The value of the constant TextEvent.DOM_VK_F24 is 0x31.
Objects that implement the TextEvent interface:
Objects that implement the TextEvent interface have all properties and functions of the UIEvent interface as well as the properties and functions defined below.
Properties of objects that implement the TextEvent interface:
outputString
This property is a String.
keyVal
This property is a Number.
virtKeyVal
This property is a Number.
visibleOutputGenerated
This property is a Boolean.
numPad
This property is a Boolean.
Functions of objects that implement the TextEvent interface:
checkModifier(modifier)
This function returns a Boolean.
The modifier parameter is a Number.
initTextEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, outputStringArg, keyValArg, virtKeyValArg, visibleOutputGeneratedArg, numPadArg)
This function has no return value.
The typeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The viewArg parameter is an object that implements the AbstractView interface.
The detailArg parameter is a Number.
The outputStringArg parameter is a String.
The keyValArg parameter is a Number.
The virtKeyValArg parameter is a Number.
The visibleOutputGeneratedArg parameter is a Boolean.
The numPadArg parameter is a Boolean.
initTextEventNS(namespaceURI, type, canBubbleArg, cancelableArg, viewArg, detailArg, outputStringArg, keyValArg, virtKeyValArg, visibleOutputGeneratedArg, numPadArg)
This function has no return value.
The namespaceURI parameter is a String.
The type parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The viewArg parameter is an object that implements the AbstractView interface.
The detailArg parameter is a Number.
The outputStringArg parameter is a String.
The keyValArg parameter is a Number.
The virtKeyValArg parameter is a Number.
The visibleOutputGeneratedArg parameter is a Boolean.
The numPadArg parameter is a Boolean.
initModifier(modifier, value)
This function has no return value.
The modifier parameter is a Number.
The value parameter is a Boolean.
Properties of the MutationEvent Constructor function:
MutationEvent.MODIFICATION
The value of the constant MutationEvent.MODIFICATION is 1.
MutationEvent.ADDITION
The value of the constant MutationEvent.ADDITION is 2.
MutationEvent.REMOVAL
The value of the constant MutationEvent.REMOVAL is 3.
Objects that implement the MutationEvent interface:
Objects that implement the MutationEvent interface have all properties and functions of the Event interface as well as the properties and functions defined below.
Properties of objects that implement the MutationEvent interface:
relatedNode
This read-only property is an object that implements the Node interface.
prevValue
This read-only property is a String.
newValue
This read-only property is a String.
attrName
This read-only property is a String.
attrChange
This read-only property is a Number.
Functions of objects that implement the MutationEvent interface:
initMutationEvent(typeArg, canBubbleArg, cancelableArg, relatedNodeArg, prevValueArg, newValueArg, attrNameArg, attrChangeArg)
This function has no return value.
The typeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The relatedNodeArg parameter is an object that implements the Node interface.
The prevValueArg parameter is a String.
The newValueArg parameter is a String.
The attrNameArg parameter is a String.
The attrChangeArg parameter is a Number.
initMutationEventNS(namespaceURI, typeArg, canBubbleArg, cancelableArg, relatedNodeArg, prevValueArg, newValueArg, attrNameArg, attrChangeArg)
This function has no return value.
The namespaceURI parameter is a String.
The typeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The relatedNodeArg parameter is an object that implements the Node interface.
The prevValueArg parameter is a String.
The newValueArg parameter is a String.
The attrNameArg parameter is a String.
The attrChangeArg parameter is a Number.
Objects that implement the MutationNameEvent interface:
Objects that implement the MutationNameEvent interface have all properties and functions of the MutationEvent interface as well as the properties and functions defined below.
Properties of objects that implement the MutationNameEvent interface:
prevNamespaceURI
This read-only property is a String.
prevNodeName
This read-only property is a String.
Functions of objects that implement the MutationNameEvent interface:
initMutationNameEventNS(namespaceURI, typeArg, canBubbleArg, cancelableArg, relatedNodeArg, prevNamespaceURI, prevNodeName)
This function has no return value.
The namespaceURI parameter is a String.
The typeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The relatedNodeArg parameter is an object that implements the Node interface.
The prevNamespaceURI parameter is a String.
The prevNodeName parameter is a String.