Event methods
Event creation and initialization methods:
Event assigning methods:
Event raising methods:
Event capturing methods:
Event simulation methods:
Drag and drop methods:
Property | Support | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
createEvent (document, XMLDocument) |
|
Creates an event object with the specified type. | ||||||||||
createEventObject (document) |
Creates an event object for message sending. | |||||||||||
initDragEvent (event) |
|
Initializes an event object created by the createEvent method with type of 'DragEvent'. | ||||||||||
initEvent (event) |
|
Initializes an event object created by the createEvent method. | ||||||||||
initKeyEvent (event) |
Initializes an event object created by the createEvent method with type of 'KeyboardEvent'. | |||||||||||
initMessageEvent (event) |
|
Initializes an event object created by the createEvent method with type of 'MessageEvent'. | ||||||||||
initMouseEvent (event) |
|
Initializes an event object created by the createEvent method with type of 'MouseEvent'. | ||||||||||
initMutationEvent (event) |
|
Initializes an event object created by the createEvent method with type of 'MutationEvent'. | ||||||||||
initOverflowEvent (event) |
Initializes an event object created by the createEvent method with type of 'OverflowEvent'. | |||||||||||
initTextEvent (event) |
|
Initializes an event object created by the createEvent method with type of 'TextEvent'. | ||||||||||
initUIEvent (event) |
|
Initializes an event object created by the createEvent method with type of 'UIEvent'. |
Property | Support | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
addEventListener |
|
Registers an event handler function (event listener) for the specified event on the current object. | ||||||||||
attachEvent | Registers an event handler function (event listener) for the specified event on the current object. | |||||||||||
detachEvent | Removes the specified event handler from the current element that was registered earlier with the attachEvent method. | |||||||||||
removeEventListener |
|
Removes the specified event handler from the current element that was registered earlier with the addEventListener method. |
Property | Support | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
bubbleEvent (external) |
Dispatches the current standard event from a Scriptlet Component to the browser window. | |||||||||||
dispatchEvent |
|
Dispatches the specified event to the current element. | ||||||||||
fireEvent | Initializes an event object and dispatches it to the current element. | |||||||||||
getPreventDefault (event) |
Returns whether the default action of the current event is canceled or not. | |||||||||||
postMessage (window) |
|
Provides communication between two documents regardless of their location. | ||||||||||
preventDefault (event) |
|
Cancels the current event. | ||||||||||
raiseEvent (external) |
Dispatches the specified custom event from a Scriptlet Component to the browser window. | |||||||||||
stopPropagation (event) |
|
Disables the propagation of the current event in the DOM hierarchy. |
Property | Support | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
captureEvents (document, window) |
|
Tells the document or window object to capture the specified types of events. | ||||||||||
disableExternalCapture (window) |
|
Disables event capturing for documents that are located in different domains. | ||||||||||
enableExternalCapture (window) |
|
Allows event capturing for documents that are located in different domains. | ||||||||||
releaseCapture | Releases the mouse capture from the browser window that was previously set by the setCapture method and restores the normal event processing. | |||||||||||
releaseEvents (document, window) |
|
Stops capturing the specified events that was previously set by the captureEvents method. | ||||||||||
setCapture | Sets the current object to capture mouse events that occur within the entire browser window. |
Property | Support | Description | |||||
---|---|---|---|---|---|---|---|
blur | Removes the focus from the current element, and fires the onblur event. | ||||||
click | Simulates a mouse click on the current element. | ||||||
doScroll (body, div, html, span, textarea) |
Simulates a mouse click on the specified scrollbar component of the current element. | ||||||
dragDrop | Initiates a drag-and-drop operation. | ||||||
focus | Sets the focus on the current element. | ||||||
reset (form) |
Restores the contents of the elements contained by the current form to its original value. | ||||||
setActive | Sets the element as the active element in the current document. | ||||||
submit (form) |
Submits the data placed in the current form element. |
Property | Support | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
addElement (dataTransfer) |
|
Specifies the feedback image for the current drag-and-drop operation. | ||||||||||
clearData (dataTransfer) |
|
Removes the specified formatted data from the current drag-and-drop operation. | ||||||||||
getData (dataTransfer) |
|
Retrieves the specified formatted data from the current drag-and-drop operation. | ||||||||||
mozClearDataAt (dataTransfer) |
|
Removes the specified formatted data associated to the dragged item at the specified position from the current drag-and-drop operation. | ||||||||||
mozGetDataAt (dataTransfer) |
|
Retrieves the specified formatted data associated to the dragged item at the specified position from the current drag-and-drop operation. | ||||||||||
mozSetDataAt (dataTransfer) |
|
Specifies the data, its format and the associated position for the current drag-and-drop operation. | ||||||||||
mozTypesAt (dataTransfer) |
|
Returns a DOMStringList collection that contains the available data formats for the item at the specified position in the current drag-and-drop operation. | ||||||||||
setData (dataTransfer) |
|
Specifies the data and its format for the current drag-and-drop operation. | ||||||||||
setDragImage (dataTransfer) |
|
Specifies the feedback image and the mouse cursor position for the current drag-and-drop operation. |
User Contributed Comments