Export (0) Print
Expand All

Methods

This section describes event related methods, including those described in Document Object Model (DOM) Level 3 Events.

In this section

TopicDescription

add

Creates a new a new DataTransferItem with the supplied data and adds it to the list.

addEventListener

Registers an event handler for the specified event type.

addPointer

Adds a contact on an element to an MSGesture object.

cancelBubble

Gets or sets a value that indicates whether an event should be stopped from propagating up from the current target.

clear

Removes all DataTransferItems in the list.

msConvertURL

Instructs the HTML paste operation on how to modify the src attribute that correspond to each file in the clipboardData.files collection.

createEvent

Creates a DOM event of the specified type.

createTouch

Creates a Touch object with the specified attributes.

createTouchList

Creates a TouchList array consisting of zero or more Touch objects. Calling this method with no arguments creates a TouchList array with no objects in it whose length is 0 (zero).

dispatchEvent

Sends an event to the current element.

fireEvent

Fires a specified event on the object.

getAsFile

Returns the file associated with the DataTransferItem.

getAsString

Invokes the given callback function, passing it the DataTransferItem object string as an argument.

getCurrentPoint

Retrieves a PointerPoint object that provides basic info on the pointer associated with the event.

getIntermediatePoints

Retrieves a collection of PointerPoint objects that represent the pointer history from the last pointer event up to and including the current pointer event. Each PointerPoint in the collection provides basic info on the pointer associated with the event.

getModifierState

Queries the state of the specified modifier key.

initAnimationEvent

Initializes the values of an animation event.

initCloseEvent

Initializes the close event.

initCompositionEvent

Initializes a new text composition event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initCustomEvent

Initializes a new custom event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initDeviceMotionEvent

Used to create a DeviceMotionEvent event from JavaScript.

initDeviceOrientationEvent

Used to create a DeviceOrientationEvent from JavaScript.

initDragEvent

Initializes a new drag event.

initErrorEvent

Creates an Error Event that can be dispatched from a JavaScript client.

initEvent

Initializes a new generic event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initFocusEvent

Initializes a new focus event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initGestureEvent

Initializes a newly-created gesture event.

initKeyboardEvent

Initializes a new keyboard event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initMessageEvent

Initializes a new cross-document message (XDM) event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initMouseEvent

Initializes a new mouse event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initMouseWheelEvent

Initializes a new mouse wheel event that the createEvent method created. For the standards based method, see initWheelEvent.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initMSManipulationEvent

Used to create a manipulation event that can be called from JavaScript.

initMutationEvent

Initializes a new DOM mutation (modification) event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initPointerEvent

Used to create an PointerEvent from JavaScript.

initPopStateEvent

Initializes the properties of a PopStateEvent.

initProgressEvent

Initializes the value of a ProgressEvent object.

initTextEvent

Initializes a new text event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initTransitionEvent

Used to initialize the value of a TransitionEvent.

initUIEvent

Initializes a new user interface event that the createEvent method created.

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

initWheelEvent

Important  As of Internet Explorer for Windows 10 Technical Preview, the createEvent()/initEvent() constructor pattern for synthetic events is deprecated. See the Synthetic Events page for more information.

Initializes a new mouse wheel event that the createEvent method created.

preventDefault

Cancels the default action of an event.

releasePointerCapture

Releases a pointer captured by an element (using the setPointerCapture method).

remove

Removes the specified DataTransferItem from the list.

removeEventListener

Removes an event handler that the addEventListener method registered.

setPointerCapture

Assigns a specified pointer to an element. This method is used to ensure that an element continues to receive pointer events even if the contact moves off the element.

stop

Stops and resets all ongoing gesture and inertia related events, and fires an onmsgestureend event on the target element.

stopImmediatePropagation

Prevents any further propagation of an event.

stopPropagation

Prevents propagation of an event beyond the current target.

 

 

 

Show:
© 2015 Microsoft