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 a Number.
- namespaceURI
- This read-only property is a String.
- defaultPrevented
- This read-only property is a Boolean.
- 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.
- stopImmediatePropagation()
- This function has no return value.
- 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 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.
- Properties of objects that implement the CustomEvent interface:
-
- detail
- This read-only property is an object that implements the Object interface.
- Functions of objects that implement the CustomEvent interface:
-
- initCustomEventNS(namespaceURIArg, typeArg, canBubbleArg, cancelableArg, detailArg)
- This function has no return value.
The namespaceURIArg parameter is a String.
The typeArg parameter is a String.
The canBubbleArg parameter is a Boolean.
The cancelableArg parameter is a Boolean.
The detailArg parameter is an object that implements the Object interface.
- 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 or the DOMException interface.
- addEventListenerNS(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.
- 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.
- 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 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(namespaceURIArg, typeArg, canBubbleArg, cancelableArg, viewArg, detailArg)
- This function has no return value.
The namespaceURIArg 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(namespaceURIArg, typeArg, canBubbleArg, cancelableArg, viewArg, dataArg)
- This function has no return value.
The namespaceURIArg 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 dataArg parameter is a String.
- 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.
- 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.
- Functions of objects that implement the KeyboardEvent interface:
-
- getModifierState(keyIdentifierArg)
- This function returns a Boolean.
The keyIdentifierArg parameter is a String.
- initKeyboardEvent(typeArg, canBubbleArg, cancelableArg, viewArg, keyIdentifierArg, keyLocationArg, modifiersListArg)
- 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 modifiersListArg parameter is a String.
- initKeyboardEventNS(namespaceURIArg, typeArg, canBubbleArg, cancelableArg, viewArg, keyIdentifierArg, keyLocationArg, modifiersListArg)
- This function has no return value.
The namespaceURIArg 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 keyIdentifierArg parameter is a String.
The keyLocationArg parameter is a Number.
The modifiersListArg 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.
- 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.
- getModifierState(keyIdentifierArg)
- This function returns a Boolean.
The keyIdentifierArg parameter is a String.
- initMouseEventNS(namespaceURIArg, typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, buttonArg, relatedTargetArg, modifiersListArg)
- This function has no return value.
The namespaceURIArg 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 buttonArg parameter is a Number.
The relatedTargetArg parameter is an object that implements the EventTarget interface.
The modifiersListArg parameter is a String.
- Objects that implement the MouseMultiWheelEvent interface:
-
- Objects that implement the MouseMultiWheelEvent interface have all properties and functions of the MouseEvent interface as well as the properties and functions defined below.
- Properties of objects that implement the MouseMultiWheelEvent interface:
-
- wheelDeltaX
- This read-only property is a Number.
- wheelDeltaY
- This read-only property is a Number.
- wheelDeltaZ
- This read-only property is a Number.
- Functions of objects that implement the MouseMultiWheelEvent interface:
-
- initMouseMultiWheelEventNS(namespaceURIArg, typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, buttonArg, relatedTargetArg, modifiersListArg, wheelDeltaXArg, wheelDeltaYArg, wheelDeltaZArg)
- This function has no return value.
The namespaceURIArg 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 buttonArg parameter is a Number.
The relatedTargetArg parameter is an object that implements the EventTarget interface.
The modifiersListArg parameter is a String.
The wheelDeltaXArg parameter is a Number.
The wheelDeltaYArg parameter is a Number.
The wheelDeltaZArg parameter is a Number.
- Objects that implement the MouseWheelEvent interface:
-
- Objects that implement the MouseWheelEvent interface have all properties and functions of the MouseEvent interface as well as the properties and functions defined below.
- Properties of objects that implement the MouseWheelEvent interface:
-
- wheelDelta
- This read-only property is a Number.
- Functions of objects that implement the MouseWheelEvent interface:
-
- initMouseWheelEventNS(namespaceURIArg, typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, buttonArg, relatedTargetArg, modifiersListArg, wheelDeltaArg)
- This function has no return value.
The namespaceURIArg 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 buttonArg parameter is a Number.
The relatedTargetArg parameter is an object that implements the EventTarget interface.
The modifiersListArg parameter is a String.
The wheelDeltaArg parameter is a Number.
- 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(namespaceURIArg, typeArg, canBubbleArg, cancelableArg, relatedNodeArg, prevValueArg, newValueArg, attrNameArg, attrChangeArg)
- This function has no return value.
The namespaceURIArg 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, prevNamespaceURIArg, prevNodeNameArg)
- 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 prevNamespaceURIArg parameter is a String.
The prevNodeNameArg parameter is a String.
- initMutationNameEventNS(namespaceURIArg, typeArg, canBubbleArg, cancelableArg, relatedNodeArg, prevNamespaceURIArg, prevNodeNameArg)
- This function has no return value.
The namespaceURIArg 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 prevNamespaceURIArg parameter is a String.
The prevNodeNameArg parameter is a String.