initPointerEvent method

Used to create an MSPointerEvent from JavaScript.

Internet Explorer 10

 

Syntax


object.initPointerEvent(typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg, offsetXArg, offsetYArg, widthArg, heightArg, pressure, rotation, tiltX, tiltY, pointerIdArg, pointerType, hwTimestampArg, isPrimary);

Parameters

typeArg [in]

Type: DOMString

The type of the event being created

canBubbleArg [in]

Type: boolean

Indicates whether the event can bubble. When true the event should propagate upward. When false the event does not propagate upward.

cancelableArg [in]

Type: boolean

Indicates whether the event’s default action can be prevented. When true, the default action can be canceled. When false, the default action cannot be canceled.

viewArg [in]

Type: AbstractView

The view in which the event is taking place.

detailArg [in]

Type: long

Specifies some detailed information depending upon the event.

screenXArg [in]

Type: long

The x-coordinate of the event in screen coordinates relative to the upper left corner of the screen.

screenYArg [in]

Type: long

The y-coordinate of the event in screen coordinates relative to the upper left corner of the screen.

clientXArg [in]

Type: float

The x-coordinate of the event in client coordinates relative to the upper-left corner of the document's client area.

clientYArg [in]

Type: float

The y-coordinate of the event in client coordinates relative to the upper-left corner of the document's client area.

ctrlKeyArg [in]

Type: boolean

Indicates the state of the Ctrl key. When true, the left or right Ctrl key is pressed. If false, neither Ctrl key is pressed.

altKeyArg [in]

Type: boolean

Indicates the state of the Alt key. When true, the left or right Alt key is pressed. If false, neither Alt key is pressed.

shiftKeyArg [in]

Type: boolean

Indicates the state of the Shift key. When true, the left or right Shift key is pressed. If false, neither Shift key is pressed.

metaKeyArg [in]

Type: boolean

Indicates the state of the Meta/Command key. If true, the left or right Meta/Command key is pressed. If false neither Meta/Command key is pressed.

buttonArg [in]

Type: unsigned short

If the event is caused by a mouse event, this indicates the mouse button that caused the event.

relatedTargetArg [in]

Type: EventTarget

A reference to the related element.

offsetXArg [in]

Type: float

The x-coordinate of the event in the element.

offsetYArg [in]

Type: float

The y-coordinate of the event in the element.

widthArg [in]

Type: long

The contact width of the pointer point specified by pointerId.

heightArg [in]

Type: long

The contact height of the pointer point specified by pointerId.

pressure [in]

Type: float

Pen pressure normalized in a range of 0 to 255.

rotation [in]

Type: long

Clockwise rotation of the cursor around its own major axis. Range: 0 to 359.

tiltX [in]

Type: long

The plane angle between the Y-Z plane and the plane containing the transducer axis and the Y axis. A positive X Tilt is to the right. This quantity is used in conjunction with Y Tilt to represent the tilt away from normal of a transducer, such as a stylus. Range: -90 to +90.

tiltY [in]

Type: long

Represents the angle between the X-Z and transducer-X planes. A positive Y Tilt is toward the user. Range: -90 to +90.

pointerIdArg [in]

Type: long

Specifies the unique ID of the contact.

pointerType [in]

Type: long

Indicates whether the source is touch, pen or mouse.

hwTimestampArg [in]

Type: unsigned long long

Used to specify the time at which the event was created in microseconds.

isPrimary [in]

Type: boolean

Indicates whether this is the primary pointer that is used to control the mouse position in a multi-touch scenario.

Return value

This method does not return a value.

 

 

Show: