From 8dc90049c9a2a57fe96b0a89a443cbecea202321 Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Fri, 14 Aug 2009 04:49:47 +0000 Subject: Add the new two interface file for Events module testing. svn path=/trunk/dom/; revision=9282 --- test/dom2-events-interface.xml | 588 ++++++++++++++++ test/dom3-events-interface.xml | 1472 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2060 insertions(+) create mode 100644 test/dom2-events-interface.xml create mode 100644 test/dom3-events-interface.xml (limited to 'test') diff --git a/test/dom2-events-interface.xml b/test/dom2-events-interface.xml new file mode 100644 index 0000000..8b9e850 --- /dev/null +++ b/test/dom2-events-interface.xml @@ -0,0 +1,588 @@ + + + + + + +

TheEventTargetinterface is implemented by allNodesin an implementation which supports the DOM Event Model. Therefore, this interface can be obtained by using binding-specific casting methods on an instance of theNodeinterface. The interface allows registration and removal ofEventListenerson anEventTargetand dispatch of events to thatEventTarget.

+
+ + +

This method allows the registration of event listeners on the event target. If anEventListeneris added to anEventTargetwhile it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.

+

If multiple identicalEventListeners are registered on the sameEventTargetwith the same parameters the duplicate instances are discarded. They do not cause theEventListenerto be called twice and since they are discarded they do not need to be removed with theremoveEventListenermethod.

+
+ + + +

The event type for which the user is registering

+
+ + + +

Thelistenerparameter takes an interface implemented by the user which contains the methods to be called when the event occurs.

+
+ + + +

If true,useCaptureindicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registeredEventListenerbefore being dispatched to anyEventTargetsbeneath them in the tree. Events which are bubbling upward through the tree will not trigger anEventListenerdesignated to use capture.

+
+ +
+ + +

+ + + + + + +

This method allows the removal of event listeners from the event target. If anEventListeneris removed from anEventTargetwhile it is processing an event, it will not be triggered by the current actions.EventListeners can never be invoked after being removed.

+

CallingremoveEventListenerwith arguments which do not identify any currently registeredEventListeneron theEventTargethas no effect.

+
+ + + +

Specifies the event type of theEventListenerbeing removed.

+
+ + + +

TheEventListenerparameter indicates theEventListenerto be removed.

+
+ + + +

Specifies whether theEventListenerbeing removed was registered as a capturing listener or not. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa.

+
+ +
+ + +

+ + + + + + +

This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is theEventTargeton whichdispatchEventis called.

+
+ + + +

Specifies the event type, behavior, and contextual information to be used in processing the event.

+
+ +
+ + +

The return value ofdispatchEventindicates whether any of the listeners which handled the event calledpreventDefault. IfpreventDefaultwas called the value is false, else the value is true.

+
+
+ + + +

UNSPECIFIED_EVENT_TYPE_ERR: Raised if theEvent's type was not specified by initializing the event beforedispatchEventwas called. Specification of theEvent's type asnullor an empty string will also trigger this exception.

+
+
+
+
+
+ + +

TheEventListenerinterface is the primary method for handling events. Users implement theEventListenerinterface and register their listener on anEventTargetusing theAddEventListenermethod. The users should also remove theirEventListenerfrom itsEventTargetafter they have completed using the listener.

+

When aNodeis copied using thecloneNodemethod theEventListeners attached to the sourceNodeare not attached to the copiedNode. If the user wishes the sameEventListeners to be added to the newly created copy the user must add them manually.

+
+ + +

This method is called whenever an event occurs of the type for which theEventListenerinterface was registered.

+
+ + + +

TheEventcontains contextual information about the event. It also contains thestopPropagationandpreventDefaultmethods which are used in determining the event's flow and default action.

+
+ +
+ + +

+ + + + + + + +

TheEventinterface is used to provide contextual information about an event to the handler processing the event. An object which implements theEventinterface is generally passed as the first parameter to an event handler. More specific context information is passed to event handlers by deriving additional interfaces fromEventwhich contain information directly relating to the type of event they accompany. These derived interfaces are also implemented by the object passed to the event listener.

+
+ + +

An integer indicating which phase of event flow is being processed.

+
+ + +

The current event phase is the capturing phase.

+
+
+ + +

The event is currently being evaluated at the targetEventTarget.

+
+
+ + +

The current event phase is the bubbling phase.

+
+
+
+ + +

The name of the event (case-insensitive). The name must be anXML name.

+
+
+ + +

Used to indicate theEventTargetto which the event was originally dispatched.

+
+
+ + +

Used to indicate theEventTargetwhoseEventListenersare currently being processed. This is particularly useful during capturing and bubbling.

+
+
+ + +

Used to indicate which phase of event flow is currently being evaluated.

+
+
+ + +

Used to indicate whether or not an event is a bubbling event. If the event can bubble the value is true, else the value is false.

+
+
+ + +

Used to indicate whether or not an event can have its default action prevented. If the default action can be prevented the value is true, else the value is false.

+
+
+ + +

Used to specify the time (in milliseconds relative to the epoch) at which the event was created. Due to the fact that some systems may not provide this information the value oftimeStampmay be not available for all events. When not available, a value of 0 will be returned. Examples of epoch time are the time of the system start or 0:0:0 UTC 1st January 1970.

+
+
+ + +

ThestopPropagationmethod is used prevent further propagation of an event during event flow. If this method is called by anyEventListenerthe event will cease propagating through the tree. The event will complete dispatch to all listeners on the currentEventTargetbefore event flow stops. This method may be used during any stage of event flow.

+
+ + + +

+ + + + + + +

If an event is cancelable, thepreventDefaultmethod is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur. If, during any stage of event flow, thepreventDefaultmethod is called the event is canceled. Any default action associated with the event will not occur. Calling this method for a non-cancelable event has no effect. OncepreventDefaulthas been called it will remain in effect throughout the remainder of the event's propagation. This method may be used during any stage of event flow.

+
+ + + +

+ + + + + + +

TheinitEventmethod is used to initialize the value of anEventcreated through theDocumentEventinterface. This method may only be called before theEventhas been dispatched via thedispatchEventmethod, though it may be called multiple times during that phase if necessary. If called multiple times the final invocation takes precedence. If called from a subclass ofEventinterface only the values specified in theinitEventmethod are modified, all other attributes are left unchanged.

+
+ + + +

Specifies the event type. This type may be any event type currently defined in this specification or a new event type.. The string must be anXML name.

+

Any new event type must not begin with any upper, lower, or mixed case version of the string "DOM". This prefix is reserved for future DOM event sets. It is also strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.

+
+ + + +

Specifies whether or not the event can bubble.

+
+ + + +

Specifies whether or not the event's default action can be prevented.

+
+ +
+ + +

+ + + + + + + +

Event operations may throw anEventExceptionas specified in their method descriptions.

+
+ + unsigned short + + + + +

An integer indicating the type of error generated.

+
+ + +

If theEvent's type was not specified by initializing the event before the method was called. Specification of the Event's type asnullor an empty string will also trigger this exception.

+
+
+
+ + +

TheDocumentEventinterface provides a mechanism by which the user can create an Event of a type supported by the implementation. It is expected that theDocumentEventinterface will be implemented on the same object which implements theDocumentinterface in an implementation which supports the Event model.

+
+ + +

+ + + + +

TheeventTypeparameter specifies the type ofEventinterface to be created. If theEventinterface specified is supported by the implementation this method will return a newEventof the interface type requested. If theEventis to be dispatched via thedispatchEventmethod the appropriate event init method must be called after creation in order to initialize theEvent's values. As an example, a user wishing to synthesize some kind ofUIEventwould callcreateEventwith the parameter "UIEvents". TheinitUIEventmethod could then be called on the newly createdUIEventto set the specific type of UIEvent to be dispatched and set its context information.

+

ThecreateEventmethod is used in creatingEvents when it is either inconvenient or unnecessary for the user to create anEventthemselves. In cases where the implementation providedEventis insufficient, users may supply their ownEventimplementations for use with thedispatchEventmethod.

+
+ +
+ + +

The newly createdEvent

+
+
+ + + +

NOT_SUPPORTED_ERR: Raised if the implementation does not support the type ofEventinterface requested

+
+
+
+
+
+ + +

TheUIEventinterface provides specific contextual information associated with User Interface events.

+
+ + +

Theviewattribute identifies theAbstractViewfrom which the event was generated.

+
+
+ + +

Specifies some detail information about theEvent, depending on the type of event.

+
+
+ + +

TheinitUIEventmethod is used to initialize the value of aUIEventcreated through theDocumentEventinterface. This method may only be called before theUIEventhas been dispatched via thedispatchEventmethod, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.

+
+ + + +

Specifies the event type.

+
+ + + +

Specifies whether or not the event can bubble.

+
+ + + +

Specifies whether or not the event's default action can be prevented.

+
+ + + +

Specifies theEvent'sAbstractView.

+
+ + + +

Specifies theEvent's detail.

+
+ +
+ + +

+ + + + + + + +

TheMouseEventinterface provides specific contextual information associated with Mouse events.

+

Thedetailattribute inherited fromUIEventindicates the number of times a mouse button has been pressed and released over the same screen location during a user action. The attribute value is 1 when the user begins this action and increments by 1 for each full sequence of pressing and releasing. If the user moves the mouse between the mousedown and mouseup the value will be set to 0, indicating that no click is occurring.

+

In the case of nested elements mouse events are always targeted at the most deeply nested element. Ancestors of the targeted element may use bubbling to obtain notification of mouse events which occur within its descendent elements.

+
+ + +

The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.

+
+
+ + +

The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.

+
+
+ + +

The horizontal coordinate at which the event occurred relative to the DOM implementation's client area.

+
+
+ + +

The vertical coordinate at which the event occurred relative to the DOM implementation's client area.

+
+
+ + +

Used to indicate whether the 'ctrl' key was depressed during the firing of the event.

+
+
+ + +

Used to indicate whether the 'shift' key was depressed during the firing of the event.

+
+
+ + +

Used to indicate whether the 'alt' key was depressed during the firing of the event. On some platforms this key may map to an alternative key name.

+
+
+ + +

Used to indicate whether the 'meta' key was depressed during the firing of the event. On some platforms this key may map to an alternative key name.

+
+
+ + +

During mouse events caused by the depression or release of a mouse button,buttonis used to indicate which mouse button changed state. The values forbuttonrange from zero to indicate the left button of the mouse, one to indicate the middle button if present, and two to indicate the right button. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left.

+
+
+ + +

Used to identify a secondaryEventTargetrelated to a UI event. Currently this attribute is used with the mouseover event to indicate theEventTargetwhich the pointing device exited and with the mouseout event to indicate theEventTargetwhich the pointing device entered.

+
+
+ + +

TheinitMouseEventmethod is used to initialize the value of aMouseEventcreated through theDocumentEventinterface. This method may only be called before theMouseEventhas been dispatched via thedispatchEventmethod, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.

+
+ + + +

Specifies the event type.

+
+ + + +

Specifies whether or not the event can bubble.

+
+ + + +

Specifies whether or not the event's default action can be prevented.

+
+ + + +

Specifies theEvent'sAbstractView.

+
+ + + +

Specifies theEvent's mouse click count.

+
+ + + +

Specifies theEvent's screen x coordinate

+
+ + + +

Specifies theEvent's screen y coordinate

+
+ + + +

Specifies theEvent's client x coordinate

+
+ + + +

Specifies theEvent's client y coordinate

+
+ + + +

Specifies whether or not control key was depressed during theEvent.

+
+ + + +

Specifies whether or not alt key was depressed during theEvent.

+
+ + + +

Specifies whether or not shift key was depressed during theEvent.

+
+ + + +

Specifies whether or not meta key was depressed during theEvent.

+
+ + + +

Specifies theEvent's mouse button.

+
+ + + +

Specifies theEvent's relatedEventTarget.

+
+ +
+ + +

+ + + + + + + +

TheMutationEventinterface provides specific contextual information associated with Mutation events.

+
+ + +

An integer indicating in which way theAttrwas changed.

+
+ + +

TheAttrwas modified in place.

+
+
+ + +

TheAttrwas just added.

+
+
+ + +

TheAttrwas just removed.

+
+
+
+ + +

relatedNodeis used to identify a secondary node related to a mutation event. For example, if a mutation event is dispatched to a node indicating that its parent has changed, therelatedNodeis the changed parent. If an event is instead dispatched to a subtree indicating a node was changed within it, therelatedNodeis the changed node. In the case of the DOMAttrModified event it indicates theAttrnode which was modified, added, or removed.

+
+
+ + +

prevValueindicates the previous value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharDataModified events.

+
+
+ + +

newValueindicates the new value of theAttrnode in DOMAttrModified events, and of theCharacterDatanode in DOMCharDataModified events.

+
+
+ + +

attrNameindicates the name of the changedAttrnode in a DOMAttrModified event.

+
+
+ + +

attrChangeindicates the type of change which triggered the DOMAttrModified event. The values can beMODIFICATION,ADDITION, orREMOVAL.

+
+
+ + +

TheinitMutationEventmethod is used to initialize the value of aMutationEventcreated through theDocumentEventinterface. This method may only be called before theMutationEventhas been dispatched via thedispatchEventmethod, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence.

+
+ + + +

Specifies the event type.

+
+ + + +

Specifies whether or not the event can bubble.

+
+ + + +

Specifies whether or not the event's default action can be prevented.

+
+ + + +

Specifies theEvent's related Node.

+
+ + + +

Specifies theEvent'sprevValueattribute. This value may be null.

+
+ + + +

Specifies theEvent'snewValueattribute. This value may be null.

+
+ + + +

Specifies theEvent'sattrNameattribute. This value may be null.

+
+ + + +

Specifies theEvent'sattrChangeattribute

+
+ +
+ + +

+ + + + + + diff --git a/test/dom3-events-interface.xml b/test/dom3-events-interface.xml new file mode 100644 index 0000000..4691c58 --- /dev/null +++ b/test/dom3-events-interface.xml @@ -0,0 +1,1472 @@ + + + + + + +

TheEventinterface is used to provide contextual information about an event to the listener processing the event. An object which implements theEventinterface is passed as the parameter to anEventListener. More specific context information is passed to event listeners by deriving additional interfaces fromEventwhich contain information directly relating to the type of event they represent. These derived interfaces are also implemented by the object passed to the event listener.

+

To create an instance of theEventinterface, use theDocumentEvent.createEvent("Event")method call.

+
+ + +

An integer indicating which phase of the event flow is being processed as defined in.

+
+ + +

The current event phase is thecapture phase.

+
+
+ + +

The current event is in thetarget phase, i.e. it is being evaluated at theevent target.

+
+
+ + +

The current event phase is thebubbling phase.

+
+
+
+ + +

The name should be anas defined inand is case-sensitive.

+

If the attributeEvent.namespaceURIis different fromnull, this attribute represents alocal name.

+
+
+ + +

Used to indicate theevent target. This attribute contains thetarget nodewhen used with the.

+
+
+ + +

Used to indicate theEventTargetwhoseEventListenersare currently being processed. This is particularly useful during the capture and bubbling phases. This attribute could contain thetarget nodeor a target ancestor when used with the.

+
+
+ + +

Used to indicate which phase of event flow is currently being accomplished.

+
+
+ + +

Used to indicate whether or not an event is a bubbling event. If the event can bubble the value istrue, otherwise the value isfalse.

+
+
+ + +

Used to indicate whether or not an event can have its default action prevented (see also). If the default action can be prevented the value istrue, otherwise the value isfalse.

+
+
+ + +

Used to specify the time (in milliseconds relative to the epoch) at which the event was created. Due to the fact that some systems may not provide this information the value oftimeStampmay be not available for all events. When not available, a value of0will be returned. Examples of epoch time are the time of the system start or 0:0:0 UTC 1st January 1970.

+
+
+ + +

This method is used to prevent event listeners of the same group to be triggered but its effect is deferred until all event listeners attached on thecurrentTargethave been triggered (see). Once it has been called, further calls to that method have no additional effect.

+ +

This method does not prevent the default action from being invoked; usepreventDefaultfor that effect.

+
+
+ + + +

+ + + + + + +

If an event is cancelable, thepreventDefaultmethod is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur (see also), and thus independently of event groups. Calling this method for a non-cancelable event has no effect.

+ +

This method does not stop the event propagation; usestopPropagationorstopImmediatePropagationfor that effect.

+
+
+ + + +

+ + + + + + +

TheinitEventmethod is used to initialize the value of anEventcreated through theDocumentEvent.createEventmethod. This method may only be called before theEventhas been dispatched via theEventTarget.dispatchEvent()method. If the method is called several times before invokingEventTarget.dispatchEvent, only the final invocation takes precedence. This method has no effect if called after the event has been dispatched. If called from a subclass of theEventinterface only the values specified in this method are modified, all other attributes are left unchanged.

+

This method sets theEvent.typeattribute toeventTypeArg, andEvent.namespaceURItonull. To initialize an event with a namespace URI, use theEvent.initEventNS(namespaceURIArg, eventTypeArg, ...)method.

+
+ + + +

SpecifiesEvent.type.

+
+ + + +

SpecifiesEvent.bubbles. This parameter overrides the intrinsic bubbling behavior of the event.

+
+ + + +

SpecifiesEvent.cancelable. This parameter overrides the intrinsic cancelable behavior of the event.

+
+ +
+ + +

+ + + + + + +

Thenamespace URIassociated with this event at creation time, ornullif it is unspecified.

+

For events initialized with a DOM Level 2 Events method, such asEvent.initEvent(), this is alwaysnull.

+
+ + + +

This method will always returnfalse, unless the event implements theCustomEventinterface.

+
+ + + +

false, unless the event object implements theCustomEventinterface.

+
+
+ +
+ + +

This method is used to prevent event listeners of the same group to be triggered and, unlikestopPropagationits effect is immediate (see). Once it has been called, further calls to that method have no additional effect.

+ +

This method does not prevent the default action from being invoked; useEvent.preventDefault()for that effect.

+
+
+ + + +

+ + + + + + +

This method will returntrueif the methodEvent.preventDefault()has been called for this event,falseotherwise.

+
+ + + +

trueifEvent.preventDefault()has been called for this event.

+
+
+ +
+ + +

TheinitEventNSmethod is used to initialize the value of anEventobject and has the same behavior asEvent.initEvent().

+
+ + + +

SpecifiesEvent.namespaceuRI, thenamespace URIassociated with this event, ornullif no namespace.

+
+ + + +

SpecifiesEvent.type, thelocal nameof the event type.

+
+ + + +

Refer to theEvent.initEvent()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEvent()method for a description of this parameter.

+
+ +
+ + +

+ + + + + + + +

TheEventTargetinterface is implemented by all the objects which could beevent targetsin an implementation which supports the. The interface allows registration, removal or query of event listeners, and dispatch of events to an event target.

+

When used with, this interface is implemented by alltarget nodesand target ancestors, i.e. all DOMNodesof the tree support this interface when the implementation conforms to DOM Level 3 Events and, therefore, this interface can be obtained by using binding-specific casting methods on an instance of theNodeinterface.

+

InvokingaddEventListeneroraddEventListenerNSmultiple times on the sameEventTargetwith the same parameters (namespaceURI,type,listener, anduseCapture) is considered to be a no-op and thus independently of the event group. They do not cause theEventListenerto be called more than once and do not cause a change in the triggering order. In order to guarantee that an event listener will be added to the event target for the specified event group, one needs to invokeremoveEventListenerorremoveEventListenerNSfirst.

+
+ + +

This method allows the registration of an event listener in the default group and, depending on theuseCaptureparameter, on the capture phase of the DOM event flow or its target and bubbling phases.

+
+ + + +

Specifies theEvent.typeassociated with the event for which the user is registering.

+
+ + + +

Thelistenerparameter takes an object implemented by the user which implements theEventListenerinterface and contains the method to be called when the event occurs.

+
+ + + +

If true,useCaptureindicates that the user wishes to add the event listener for thecapture phaseonly, i.e. this event listener will not be triggered during thetargetandbubblingphases. Iffalse, the event listener will only be triggered during the target and bubbling phases.

+
+ +
+ + +

+ + + + + + +

This method allows the removal of event listeners from the default group.

+

CallingremoveEventListenerwith arguments which do not identify any currently registeredEventListeneron theEventTargethas no effect.

+
+ + + +

Specifies theEvent.typefor which the user registered the event listener.

+
+ + + +

TheEventListenerto be removed.

+
+ + + +

Specifies whether theEventListenerbeing removed was registered for the capture phase or not. If a listener was registered twice, once for the capture phase and once for the target and bubbling phases, each must be removed separately. Removal of an event listener registered for the capture phase does not affect the same event listener registered for the target and bubbling phases, and vice versa.

+
+ +
+ + +

+ + + + + + +

This method allows the dispatch of events into the implementation's event model. Theevent targetof the event is theEventTargetobject on whichdispatchEventis called.

+
+ + + +

The event to be dispatched.

+
+ +
+ + +

Indicates whether any of the listeners which handled the event calledEvent.preventDefault(). IfEvent.preventDefault()was called the returned value isfalse, else it istrue.

+
+
+ + + +

UNSPECIFIED_EVENT_TYPE_ERR: Raised if theEvent.typewas not specified by initializing the event beforedispatchEventwas called. Specification of theEvent.typeasnullor an empty string will also trigger this exception.

+

DISPATCH_REQUEST_ERR: Raised if theEventobject is already being dispatched in the tree.

+

NOT_SUPPORTED_ERR: Raised if theEventobject has not been created usingDocumentEvent.createEvent()or does not support the interfaceCustomEvent.

+
+
+
+
+ + +

This method allows the registration of an event listener in a specified group or the default group and, depending on theuseCaptureparameter, on the capture phase of the DOM event flow or its target and bubbling phases.

+
+ + + +

Specifies theEvent.namespaceURIassociated with the event for which the user is registering.

+
+ + + +

Specifies theEvent.typeassociated with the event for which the user is registering.

+
+ + + +

Thelistenerparameter takes an object implemented by the user which implements theEventListenerinterface and contains the method to be called when the event occurs.

+
+ + + +

If true,useCaptureindicates that the user wishes to add the event listener for thecapture phaseonly, i.e. this event listener will not be triggered during thetargetandbubblingphases. Iffalse, the event listener will only be triggered during the target and bubbling phases.

+
+ + + +

The object that represents the event group to associate with theEventListener(see also). Usenullto attach the event listener to the default group.

+
+ +
+ + + + +
+ + +

This method allows the removal of an event listener, independently of the associated event group.

+

CallingremoveEventListenerNSwith arguments which do not identify any currently registeredEventListeneron theEventTargethas no effect.

+
+ + + +

Specifies theEvent.namespaceURIassociated with the event for which the user registered the event listener.

+
+ + + +

Specifies theEvent.typeassociated with the event for which the user registered the event listener.

+
+ + + +

TheEventListenerparameter indicates theEventListenerto be removed.

+
+ + + +

Specifies whether theEventListenerbeing removed was registered for the capture phase or not. If a listener was registered twice, once for the capture phase and once for the target and bubbling phases, each must be removed separately. Removal of an event listener registered for the capture phase does not affect the same event listener registered for the target and bubbling phases, and vice versa.

+
+ +
+ + +

+ + + + + + +

This method allows the DOM application to know if an event listener, attached to thisEventTargetor one of its ancestors, will be triggered by the specified event type during the dispatch of the event to this event target or one of its descendants.

+
+ + + +

Specifies theEvent.namespaceURIassociated with the event.

+
+ + + +

Specifies theEvent.typeassociated with the event.

+
+ +
+ + +

trueif an event listener will be triggered on theEventTargetwith the specified event type,falseotherwise.

+
+
+ +
+ + +

This method allows the DOM application to know if thisEventTargetcontains an event listener registered for the specified event type. This is useful for determining at which nodes within a hierarchy altered handling of specific event types has been introduced, but should not be used to determine whether the specified event type triggers an event listener (seeEventTarget.willTriggerNS()).

+
+ + + +

Specifies theEvent.namespaceURIassociated with the event.

+
+ + + +

Specifies theEvent.typeassociated with the event.

+
+ +
+ + +

trueif an event listener is registered on thisEventTargetfor the specified event type,falseotherwise.

+
+
+ +
+
+ + +

TheEventListenerinterface is the primary way for handling events. Users implement theEventListenerinterface and register their event listener on anEventTarget. The users should also remove theirEventListenerfrom itsEventTargetafter they have completed using the listener.

+

Copying aNode, with methods such asNode.cloneNodeorRange.cloneContents, does not copy the event listeners attached to it. Event listeners must be attached to the newly createdNodeafterwards if so desired.

+

Moving aNode, with methodsDocument.adoptNode,Node.appendChild, orRange.extractContents, does not affect the event listeners attached to it.

+
+ + +

This method is called whenever an event occurs of the event type for which theEventListenerinterface was registered.

+
+ + + +

TheEventcontains contextual information about theevent.

+
+ +
+ + +

+ + + + + + + +

Event operations may throw anEventExceptionas specified in their method descriptions.

+
+ + unsigned short + + + + +

An integer indicating the type of error generated.

+
+ + +

If theEvent.typewas not specified by initializing the event before the method was called. Specification of theEvent.typeasnullor an empty string will also trigger this exception.

+
+
+ + +

If theEventobject is already dispatched in the tree.

+
+
+
+ + +

TheDocumentEventinterface provides a mechanism by which the user can create anEventobject of a type supported by the implementation. If the feature "Events" is supported by theDocumentobject, theDocumentEventinterface must be implemented on the same object. If the feature "+Events" is supported by theDocumentobject, an object that supports theDocumentEventinterface must be returned by invoking the methodNode.getFeature("+Events", "3.0")on theDocumentobject.

+
+ + +

+ + + + +

TheeventTypeparameter specifies the name of the DOM Events interface to be supported by the created event object, e.g."Event","MouseEvent","MutationEvent"and so on. If theEventis to be dispatched via theEventTarget.dispatchEvent()method the appropriate event init method must be called after creation in order to initialize theEvent's values.

+

As an example, a user wishing to synthesize some kind ofUIEventwould invokeDocumentEvent.createEvent("UIEvent"). TheUIEvent.initUIEventNS()method could then be called on the newly createdUIEventobject to set the specific type of user interface event to be dispatched,{"http://www.w3.org/2001/xml-events", "DOMActivate"}for example, and set its context information, e.g.UIEvent.detailin this example.

+

ThecreateEventmethod is used in creatingEvents when it is either inconvenient or unnecessary for the user to create anEventthemselves. In cases where the implementation providedEventis insufficient, users may supply their ownEventimplementations for use with theEventTarget.dispatchEvent()method. However, the DOM implementation needs access to the attributesEvent.currentTargetandEvent.eventPhaseto appropriately propagate the event in the DOM tree. Therefore users'Eventimplementations might need to support theCustomEventinterface for that effect.

+ +

For backward compatibility reason, "UIEvents", "MouseEvents", "MutationEvents", and "HTMLEvents" feature names are valid values for the parametereventTypeand represent respectively the interfaces "UIEvent", "MouseEvent", "MutationEvent", and "Event".

+
+
+ + + + +

The newly created event object.

+
+
+ + + +

NOT_SUPPORTED_ERR: Raised if the implementation does not support theEventinterface requested.

+
+
+
+
+ + +

Test if the implementation can generate events of a specified type.

+
+ + + +

Specifies theEvent.namespaceURIof the event.

+
+ + + +

Specifies theEvent.typeof the event.

+
+ +
+ + +

trueif the implementation can generate and dispatch this event type,falseotherwise.

+
+
+ +
+
+ + +

TheCustomEventinterface gives access to the attributesEvent.currentTargetandEvent.eventPhase. It is intended to be used by the DOM Events implementation to access the underlying current target and event phase while dispatching a customEventin the tree; it is also intended to be implemented, andnot used, by DOM applications.

+

The methods contained in this interface are not intended to be used by a DOM application, especially during the dispatch on theEventobject. Changing the current target or the current phase may result in unpredictable results of the event flow. The DOM Events implementation should ensure that both methods return the appropriate current target and phase before invoking each event listener on the current target to protect DOM applications from malicious event listeners.

+ +

If this interface is supported by the event object,Event.isCustom()must returntrue.

+
+
+ + +

ThesetDispatchStatemethod is used by the DOM Events implementation to set the values ofEvent.currentTargetandEvent.eventPhase. It also reset the states ofisPropagationStoppedandisImmediatePropagationStopped.

+
+ + + +

Specifies the new value for theEvent.currentTargetattribute.

+
+ + + +

Specifies the new value for theEvent.eventPhaseattribute.

+
+ +
+ + + + +
+ + +

This method will returntrueif the methodstopPropagation()has been called for this event,falsein any other cases.

+
+ + + +

trueif the event propagation has been stopped in the current group.

+
+
+ +
+ + +

TheisImmediatePropagationStoppedmethod is used by the DOM Events implementation to know if the methodstopImmediatePropagation()has been called for this event. It returnstrueif the method has been called,falseotherwise.

+
+ + + +

trueif the event propagation has been stopped immediately in the current group.

+
+
+ +
+
+ + +

TheUIEventinterface provides specific contextual information associated with User Interface events.

+

To create an instance of theUIEventinterface, use theDocumentEvent.createEvent("UIEvent")method call.

+
+ + +

Theviewattribute identifies theAbstractViewfrom which the event was generated.

+
+
+ + +

Specifies some detail information about theEvent, depending on the type of event.

+
+
+ + +

TheinitUIEventmethod is used to initialize the value of aUIEventobject and has the same behavior asEvent.initEvent().

+
+ + + +

Refer to theEvent.initEvent()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEvent()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEvent()method for a description of this parameter.

+
+ + + +

SpecifiesUIEvent.view.

+
+ + + +

SpecifiesUIEvent.detail.

+
+ +
+ + +

+ + + + + + +

TheinitUIEventNSmethod is used to initialize the value of aUIEventobject and has the same behavior asEvent.initEventNS().

+
+ + + +

Refer to theEvent.initEventNS()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEventNS()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEventNS()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ +
+ + +

+ + + + + + + +

TheTextEventinterface provides specific contextual information associated with Text Events.

+

To create an instance of theTextEventinterface, use theDocumentEvent.createEvent("TextEvent")method call.

+
+ + +

dataholds the value of the characters generated by the character device. This may be a single Unicode character or a non-empty sequence of Unicode characters. Characters should be normalized as defined by the Unicode normalization formNFC, defined in. This attribute cannot be null or contain the empty string.

+
+
+ + +

TheinitTextEventmethod is used to initialize the value of aTextEventobject and has the same behavior asUIEvent.initUIEvent(). The value ofUIEvent.detailremains undefined.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

SpecifiesTextEvent.data.

+
+ +
+ + + + +
+ + +

TheinitTextEventNSmethod is used to initialize the value of aTextEventobject and has the same behavior asUIEvent.initUIEventNS(). The value ofUIEvent.detailremains undefined.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theTextEvent.initTextEvent()method for a description of this parameter.

+
+ +
+ + + + +
+
+ + +

TheMouseEventinterface provides specific contextual information associated with Mouse events.

+

In the case of nested elements mouse events are always targeted at the most deeply nested element. Ancestors of the targeted element may use bubbling to obtain notification of mouse events which occur within theirs descendent elements.

+

To create an instance of theMouseEventinterface, use theDocumentEvent.createEvent("MouseEvent")method call.

+ +

When initializingMouseEventobjects usinginitMouseEventorinitMouseEventNS, implementations should use the client coordinatesclientXandclientYfor calculation of other coordinates (such as target coordinates exposed byDOM Level 0implementations).

+
+
+ + +

The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.

+
+
+ + +

The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.

+
+
+ + +

The horizontal coordinate at which the event occurred relative to the DOM implementation's client area.

+
+
+ + +

The vertical coordinate at which the event occurred relative to the DOM implementation's client area.

+
+
+ + +

trueif the control (Ctrl) key modifier is activated.

+
+
+ + +

trueif the shift (Shift) key modifier is activated.

+
+
+ + +

trueif the alt (alternative) key modifier is activated.

+ +

The Option key modifier on Macintosh systems must be represented using this key modifier.

+
+
+
+ + +

trueif the meta (Meta) key modifier is activated.

+ +

The Command key modifier on Macintosh system must be represented using this meta key.

+
+
+
+ + +

During mouse events caused by the depression or release of a mouse button,buttonis used to indicate which mouse button changed state.0indicates the normal button of the mouse (in general on the left or the one button on Macintosh mice, used to activate a button or select text).2indicates the contextual property (in general on the right, used to display a context menu) button of the mouse if present.1indicates the extra (in general in the middle and often combined with the mouse wheel) button. Some mice may provide or simulate more buttons, and values higher than2can be used to represent such buttons.

+
+
+ + +

Used to identify a secondaryEventTargetrelated to a UI event. Currently this attribute is used with the mouseover event to indicate theEventTargetwhich the pointing device exited and with the mouseout event to indicate theEventTargetwhich the pointing device entered.

+
+
+ + +

TheinitMouseEventmethod is used to initialize the value of aMouseEventobject and has the same behavior asUIEvent.initUIEvent().

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

SpecifiesMouseEvent.screenX.

+
+ + + +

SpecifiesMouseEvent.screenY.

+
+ + + +

SpecifiesMouseEvent.clientX.

+
+ + + +

SpecifiesMouseEvent.clientY.

+
+ + + +

SpecifiesMouseEvent.ctrlKey.

+
+ + + +

SpecifiesMouseEvent.altKey.

+
+ + + +

SpecifiesMouseEvent.shiftKey.

+
+ + + +

SpecifiesMouseEvent.metaKey.

+
+ + + +

SpecifiesMouseEvent.button.

+
+ + + +

SpecifiesMouseEvent.relatedTarget.

+
+ +
+ + +

+ + + + + + +

This methods queries the state of a modifier using a key identifier. See also.

+
+ + + +

A modifier key identifier, as defined by theKeyboardEvent.keyIdentifierattribute. Common modifier keys are"Alt","AltGraph","CapsLock","Control","Meta","NumLock","Scroll", or"Shift".

+ +

If an application wishes to distinguish between right and left modifiers, this information could be deduced using keyboard events andKeyboardEvent.keyLocation.

+
+
+ +
+ + +

trueif it is modifier key and the modifier is activated,falseotherwise.

+
+
+ +
+ + +

TheinitMouseEventNSmethod is used to initialize the value of aMouseEventobject and has the same behavior asUIEvent.initUIEventNS().

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theMouseEvent.initMouseEvent()method for a description of this parameter.

+
+ + + +

Refer to theMouseEvent.initMouseEvent()method for a description of this parameter.

+
+ + + +

Refer to theMouseEvent.initMouseEvent()method for a description of this parameter.

+
+ + + +

Refer to theMouseEvent.initMouseEvent()method for a description of this parameter.

+
+ + + +

Refer to theMouseEvent.initMouseEvent()method for a description of this parameter.

+
+ + + +

Refer to theMouseEvent.initMouseEvent()method for a description of this parameter.

+
+ + + +

Aseparated list of modifier key identifiers to be activated on this object. As an example,"Control Alt"will activated the control and alt modifiers.

+
+ +
+ + +

+ + + + + + + +

TheKeyboardEventinterface provides specific contextual information associated with keyboard devices. Each keyboard event references a key using an identifier. Keyboard events are commonly directed at the element that has the focus.

+

TheKeyboardEventinterface provides convenient attributes for some common modifiers keys:KeyboardEvent.ctrlKey,KeyboardEvent.shiftKey,KeyboardEvent.altKey,KeyboardEvent.metaKey. These attributes are equivalent to use the methodKeyboardEvent.getModifierState(keyIdentifierArg)with "Control", "Shift", "Alt", or "Meta" respectively.

+

To create an instance of theKeyboardEventinterface, use theDocumentEvent.createEvent("KeyboardEvent")method call.

+
+ + +

This set of constants is used to indicate the location of a key on the device. In case a DOM implementation wishes to provide a new location information, a value different from the following constant values must be used.

+
+ + +

The key activation is not distinguished as the left or right version of the key, and did not originate from the numeric keypad (or did not originate with a virtual key corresponding to the numeric keypad). Example: the 'Q' key on a PC 101 Key US keyboard.

+
+
+ + +

The key activated is in the left key location (there is more than one possible location for this key). Example: the left Shift key on a PC 101 Key US keyboard.

+
+
+ + +

The key activation is in the right key location (there is more than one possible location for this key). Example: the right Shift key on a PC 101 Key US keyboard.

+
+
+ + +

The key activation originated on the numeric keypad or with a virtual key corresponding to the numeric keypad. Example: the '1' key on a PC 101 Key US keyboard located on the numeric pad.

+
+
+
+ + +

keyIdentifierholds the identifier of the key. The key identifiers are defined in Appendix A.2 "". Implementations that are unable to identify a key must use the key identifier"Unidentified".

+
+
+ + +

ThekeyLocationattribute contains an indication of the location of they key on the device, as described in.

+
+
+ + +

trueif the control (Ctrl) key modifier is activated.

+
+
+ + +

trueif the shift (Shift) key modifier is activated.

+
+
+ + +

trueif the alternative (Alt) key modifier is activated.

+ +

The Option key modifier on Macintosh systems must be represented using this key modifier.

+
+
+
+ + +

trueif the meta (Meta) key modifier is activated.

+ +

The Command key modifier on Macintosh systems must be represented using this key modifier.

+
+
+
+ + +

This methods queries the state of a modifier using a key identifier. See also.

+
+ + + +

A modifier key identifier. Common modifier keys are"Alt","AltGraph","CapsLock","Control","Meta","NumLock","Scroll", or"Shift".

+ +

If an application wishes to distinguish between right and left modifiers, this information could be deduced using keyboard events andKeyboardEvent.keyLocation.

+
+
+ +
+ + +

trueif it is modifier key and the modifier is activated,falseotherwise.

+
+
+ +
+ + +

TheinitKeyboardEventmethod is used to initialize the value of aKeyboardEventobject and has the same behavior asUIEvent.initUIEvent(). The value ofUIEvent.detailremains undefined.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEvent()method for a description of this parameter.

+
+ + + +

SpecifiesKeyboardEvent.keyIdentifier.

+
+ + + +

SpecifiesKeyboardEvent.keyLocation.

+
+ + + +

Aseparated list of modifier key identifiers to be activated on this object.

+
+ +
+ + + + +
+ + +

TheinitKeyboardEventNSmethod is used to initialize the value of aKeyboardEventobject and has the same behavior asUIEvent.initUIEventNS(). The value ofUIEvent.detailremains undefined.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theUIEvent.initUIEventNS()method for a description of this parameter.

+
+ + + +

Refer to theKeyboardEvent.initKeyboardEvent()method for a description of this parameter.

+
+ + + +

Refer to theKeyboardEvent.initKeyboardEvent()method for a description of this parameter.

+
+ + + +

Aseparated list of modifier key identifiers to be activated on this object. As an example,"Control Alt"will activated the control and alt modifiers.

+
+ +
+ + + + +
+
+ + +

TheMutationEventinterface provides specific contextual information associated with Mutation events.

+

To create an instance of theMutationEventinterface, use theDocumentEvent.createEvent("MutationEvent")method call.

+
+ + +

An integer indicating in which way theAttrwas changed.

+
+ + +

TheAttrwas modified in place.

+
+
+ + +

TheAttrwas just added.

+
+
+ + +

TheAttrwas just removed.

+
+
+
+ + +

relatedNodeis used to identify a secondary node related to a mutation event. For example, if a mutation event is dispatched to a node indicating that its parent has changed, therelatedNodeis the changed parent. If an event is instead dispatched to a subtree indicating a node was changed within it, therelatedNodeis the changed node. In the case of the{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}event it indicates theAttrnode which was modified, added, or removed.

+
+
+ + +

prevValueindicates the previous value of theAttrnode in{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}events, and of theCharacterDatanode in{"http://www.w3.org/2001/xml-events", "DOMCharacterDataModified"}events.

+
+
+ + +

newValueindicates the new value of theAttrnode in{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}events, and of theCharacterDatanode in{"http://www.w3.org/2001/xml-events", "DOMCharacterDataModified"}events.

+
+
+ + +

attrNameindicates the name of the changedAttrnode in a{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}event.

+
+
+ + +

attrChangeindicates the type of change which triggered the{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}event. The values can beMODIFICATION,ADDITION, orREMOVAL.

+
+
+ + +

TheinitMutationEventmethod is used to initialize the value of aMutationEventobject and has the same behavior asEvent.initEvent().

+
+ + + +

Refer to theEvent.initEvent()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEvent()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEvent()method for a description of this parameter.

+
+ + + +

SpecifiesMutationEvent.relatedNode.

+
+ + + +

SpecifiesMutationEvent.prevValue. This value may be null.

+
+ + + +

SpecifiesMutationEvent.newValue. This value may be null.

+
+ + + +

SpecifiesMutationEvent.attrname. This value may be null.

+
+ + + +

SpecifiesMutationEvent.attrChange. This value may be null.

+
+ +
+ + +

+ + + + + + +

TheinitMutationEventNSmethod is used to initialize the value of aMutationEventobject and has the same behavior asEvent.initEventNS().

+
+ + + +

Refer to theEvent.initEventNS()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEventNS()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEventNS()method for a description of this parameter.

+
+ + + +

Refer to theEvent.initEventNS()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ +
+ + +

+ + + + + + + +

TheMutationNameEventinterface provides specific contextual information associated with Mutation name event types.

+

To create an instance of theMutationNameEventinterface, use theDocument.createEvent("MutationNameEvent")method call.

+
+ + +

The previous value of therelatedNode'snamespaceURI.

+
+
+ + +

The previous value of therelatedNode'snodeName.

+
+
+ + +

TheinitMutationNameEventmethod is used to initialize the value of aMutationNameEventobject and has the same behavior asMutationEvent.initMutationEvent().

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ + + +

SpecifiesMutationNameEvent.prevNamespaceURI. This value may benull.

+
+ + + +

SpecifiesMutationNameEvent.prevNodeName.

+
+ +
+ + +

+ + + + + + +

TheinitMutationNameEventNSmethod is used to initialize the value of aMutationNameEventobject and has the same behavior asMutationEvent.initMutationEventNS().

+
+ + + +

Refer to theMutationEvent.initMutationEventNS()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEventNS()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEventNS()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEventNS()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEventNS()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ + + +

Refer to theMutationEvent.initMutationEvent()method for a description of this parameter.

+
+ +
+ + +

+ + + + + + -- cgit v1.2.3