31 March 2003

Appendix E: ECMAScript Language Binding

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

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.
isCustom()
This function returns a Boolean.
stopImmediatePropagation()
This function has no return value.
isDefaultPrevented()
This function returns a Boolean.
initEventNS(namespaceURIArg, eventTypeArg, canBubbleArg, cancelableArg)
This function has no return value.
The namespaceURIArg parameter is a String.
The eventTypeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
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 Object interface.
removeEventListenerNS(namespaceURI, type, listener, useCapture)
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.
willTriggerNS(namespaceURI, type)
This function returns a Boolean.
The namespaceURI parameter is a String.
The type parameter is a String.
hasEventListenerNS(namespaceURI, type)
This function returns a Boolean.
The namespaceURI parameter is a String.
The type parameter is a String.
EventListener function:
This function has no return value. The parameter is an object that implements the Event interface.
Properties of the EventException Constructor function:
EventException.UNSPECIFIED_EVENT_TYPE_ERR
The value of the constant EventException.UNSPECIFIED_EVENT_TYPE_ERR is 0.
EventException.DISPATCH_REQUEST_ERR
The value of the constant EventException.DISPATCH_REQUEST_ERR is 1.
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.
canDispatch(namespaceURI, type)
This function returns a Boolean.
The namespaceURI parameter is a String.
The type parameter is a String.
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:
setDispatchState(target, phase)
This function has no return value.
The target parameter is an object that implements the EventTarget interface.
The phase parameter is a Number.
isPropagationStopped()
This function returns a Boolean.
isImmediatePropagationStopped()
This function returns a Boolean.
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 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:
data
This read-only property is a String.
Functions of objects that implement the TextEvent interface:
initTextEvent(typeArg, canBubbleArg, cancelableArg, viewArg, dataArg)
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 dataArg parameter is a String.
initTextEventNS(namespaceURI, type, canBubbleArg, cancelableArg, viewArg, dataArg)
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 dataArg parameter is a String.
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.
altGraphKey
This read-only property is a Boolean.
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, altGraphKeyArg)
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.
The altGraphKeyArg parameter is a Boolean.
Properties of the KeyboardEvent Constructor function:
KeyboardEvent.DOM_KEY_LOCATION_STANDARD
The value of the constant KeyboardEvent.DOM_KEY_LOCATION_STANDARD is 0x00.
KeyboardEvent.DOM_KEY_LOCATION_LEFT
The value of the constant KeyboardEvent.DOM_KEY_LOCATION_LEFT is 0x01.
KeyboardEvent.DOM_KEY_LOCATION_RIGHT
The value of the constant KeyboardEvent.DOM_KEY_LOCATION_RIGHT is 0x02.
KeyboardEvent.DOM_KEY_LOCATION_NUMPAD
The value of the constant KeyboardEvent.DOM_KEY_LOCATION_NUMPAD is 0x03.
KeyboardEvent.DOM_KEY_LOCATION_UNKNOWN
The value of the constant KeyboardEvent.DOM_KEY_LOCATION_UNKNOWN is 0x04.
Objects that implement the KeyboardEvent interface:
Objects that implement the KeyboardEvent 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 KeyboardEvent interface:
keyIdentifier
This read-only property is a String.
keyLocation
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.
altGraphKey
This read-only property is a Boolean.
Functions of objects that implement the KeyboardEvent interface:
initKeyboardEvent(typeArg, canBubbleArg, cancelableArg, viewArg, keyIdentifierArg, keyLocationArg, ctrlKeyArg, shiftKeyArg, altKeyArg, metaKeyArg, altGraphKeyArg)
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 keyIdentifierArg parameter is a String.
The keyLocationArg parameter is a Number.
The ctrlKeyArg parameter is a Boolean.
The shiftKeyArg parameter is a Boolean.
The altKeyArg parameter is a Boolean.
The metaKeyArg parameter is a Boolean.
The altGraphKeyArg parameter is a Boolean.
initKeyboardEventNS(namespaceURI, type, canBubbleArg, cancelableArg, viewArg, keyIdentifierArg, keyLocationArg, ctrlKeyArg, shiftKeyArg, altKeyArg, metaKeyArg, altGraphKeyArg)
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 keyIdentifierArg parameter is a String.
The keyLocationArg parameter is a Number.
The ctrlKeyArg parameter is a Boolean.
The shiftKeyArg parameter is a Boolean.
The altKeyArg parameter is a Boolean.
The metaKeyArg parameter is a Boolean.
The altGraphKeyArg 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:
initMutationNameEvent(typeArg, canBubbleArg, cancelableArg, relatedNodeArg, prevNamespaceURI, prevNodeName)
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 prevNamespaceURI parameter is a String.
The prevNodeName parameter is a String.
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.