---
title: "PointerEvent | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface PointerEvent

The **`PointerEvent`** interface represents the state of a DOM event produced by a pointer such as the geometry of the contact point, the device type that generated the event, the amount of pressure that was applied on the contact surface, etc.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent)

interface PointerEvent {  
    [altitudeAngle](#altitudeangle): number;  
    [altKey](#altkey): boolean;  
    [AT\_TARGET](#at_target): 2;  
    [azimuthAngle](#azimuthangle): number;  
    [bubbles](#bubbles): boolean;  
    [BUBBLING\_PHASE](#bubbling_phase): 3;  
    [button](#button): number;  
    [buttons](#buttons): number;  
    [cancelable](#cancelable): boolean;  
    [cancelBubble](#cancelbubble): boolean;  
    [CAPTURING\_PHASE](#capturing_phase): 1;  
    [clientX](#clientx): number;  
    [clientY](#clienty): number;  
    [composed](#composed): boolean;  
    [ctrlKey](#ctrlkey): boolean;  
    [currentTarget](#currenttarget): EventTarget | null;  
    [defaultPrevented](#defaultprevented): boolean;  
    [detail](#detail): number;  
    [eventPhase](#eventphase): number;  
    [height](#height): number;  
    [isPrimary](#isprimary): boolean;  
    [isTrusted](#istrusted): boolean;  
    [layerX](#layerx): number;  
    [layerY](#layery): number;  
    [metaKey](#metakey): boolean;  
    [movementX](#movementx): number;  
    [movementY](#movementy): number;  
    [NONE](#none): 0;  
    [offsetX](#offsetx): number;  
    [offsetY](#offsety): number;  
    [pageX](#pagex): number;  
    [pageY](#pagey): number;  
    [persistentDeviceId](#persistentdeviceid): number;  
    [pointerId](#pointerid): number;  
    [pointerType](#pointertype): string;  
    [pressure](#pressure): number;  
    [relatedTarget](#relatedtarget): EventTarget | null;  
    [returnValue](#returnvalue): boolean;  
    [screenX](#screenx): number;  
    [screenY](#screeny): number;  
    [shiftKey](#shiftkey): boolean;  
    [srcElement](#srcelement): EventTarget | null;  
    [tangentialPressure](#tangentialpressure): number;  
    [target](#target): EventTarget | null;  
    [tiltX](#tiltx): number;  
    [tiltY](#tilty): number;  
    [timeStamp](#timestamp): number;  
    [twist](#twist): number;  
    [type](#type): string;  
    [view](#view): [Window](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Window/) | null;  
    [which](#which): number;  
    [width](#width): number;  
    [x](#x): number;  
    [y](#y): number;  
    [composedPath](#composedpath-1)(): EventTarget\[\];  
    [getCoalescedEvents](#getcoalescedevents-1)(): PointerEvent\[\];  
    [getModifierState](#getmodifierstate-1)(keyArg: string): boolean;  
    [getPredictedEvents](#getpredictedevents-1)(): PointerEvent\[\];  
    [initEvent](#initevent-1)(type: string, bubbles?: boolean, cancelable?: boolean): void;  
    [initMouseEvent](#initmouseevent-1)(  
        typeArg: string,  
        canBubbleArg: boolean,  
        cancelableArg: boolean,  
        viewArg: [Window](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Window/),  
        detailArg: number,  
        screenXArg: number,  
        screenYArg: number,  
        clientXArg: number,  
        clientYArg: number,  
        ctrlKeyArg: boolean,  
        altKeyArg: boolean,  
        shiftKeyArg: boolean,  
        metaKeyArg: boolean,  
        buttonArg: number,  
        relatedTargetArg: EventTarget | null,  
    ): void;  
    [initUIEvent](#inituievent-1)(  
        typeArg: string,  
        bubblesArg?: boolean,  
        cancelableArg?: boolean,  
        viewArg?: [Window](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Window/) | null,  
        detailArg?: number,  
    ): void;  
    [preventDefault](#preventdefault-1)(): void;  
    [stopImmediatePropagation](#stopimmediatepropagation-1)(): void;  
    [stopPropagation](#stoppropagation-1)(): void;  
}

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#Externals.PointerEvent))

-   [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/)
    -   PointerEvent

##### Index

### Properties[](#properties)

[altitudeAngle](#altitudeangle) [altKey](#altkey) [AT\_TARGET](#at_target) [azimuthAngle](#azimuthangle) [bubbles](#bubbles) [BUBBLING\_PHASE](#bubbling_phase) [button](#button) [buttons](#buttons) [cancelable](#cancelable) [cancelBubble](#cancelbubble) [CAPTURING\_PHASE](#capturing_phase) [clientX](#clientx) [clientY](#clienty) [composed](#composed) [ctrlKey](#ctrlkey) [currentTarget](#currenttarget) [defaultPrevented](#defaultprevented) [detail](#detail) [eventPhase](#eventphase) [height](#height) [isPrimary](#isprimary) [isTrusted](#istrusted) [layerX](#layerx) [layerY](#layery) [metaKey](#metakey) [movementX](#movementx) [movementY](#movementy) [NONE](#none) [offsetX](#offsetx) [offsetY](#offsety) [pageX](#pagex) [pageY](#pagey) [persistentDeviceId](#persistentdeviceid) [pointerId](#pointerid) [pointerType](#pointertype) [pressure](#pressure) [relatedTarget](#relatedtarget) [returnValue](#returnvalue) [screenX](#screenx) [screenY](#screeny) [shiftKey](#shiftkey) [srcElement](#srcelement) [tangentialPressure](#tangentialpressure) [target](#target) [tiltX](#tiltx) [tiltY](#tilty) [timeStamp](#timestamp) [twist](#twist) [type](#type) [view](#view) [which](#which) [width](#width) [x](#x) [y](#y)

### Methods[](#methods)

[composedPath](#composedpath) [getCoalescedEvents](#getcoalescedevents) [getModifierState](#getmodifierstate) [getPredictedEvents](#getpredictedevents) [initEvent](#initevent) [initMouseEvent](#initmouseevent) [initUIEvent](#inituievent) [preventDefault](#preventdefault) [stopImmediatePropagation](#stopimmediatepropagation) [stopPropagation](#stoppropagation)

## Properties[](#properties-1)

### `Readonly`altitudeAngle[](#altitudeangle)

altitudeAngle: number

The **`altitudeAngle`** read-only property of the PointerEvent interface represents the angle between a transducer (a pointer or stylus) axis and the X-Y plane of a device screen. The altitude angle describes whether the transducer is perpendicular to the screen, parallel, or at some angle in between.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/altitudeAngle)

### `Readonly`altKey[](#altkey)

altKey: boolean

The **`MouseEvent.altKey`** read-only property is a boolean value that indicates whether the alt key was pressed or not when a given mouse event occurs.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/altKey)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[altKey](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#altkey)

### `Readonly`AT\_TARGET[](#at_target)

AT\_TARGET: 2

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[AT\_TARGET](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#at_target)

### `Readonly`azimuthAngle[](#azimuthangle)

azimuthAngle: number

The **`azimuthAngle`** read-only property of the PointerEvent interface represents the angle between the Y-Z plane and the plane containing both the transducer (pointer or stylus) axis and the Y axis.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/azimuthAngle)

### `Readonly`bubbles[](#bubbles)

bubbles: boolean

The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[bubbles](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#bubbles)

### `Readonly`BUBBLING\_PHASE[](#bubbling_phase)

BUBBLING\_PHASE: 3

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[BUBBLING\_PHASE](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#bubbling_phase)

### `Readonly`button[](#button)

button: number

The **`MouseEvent.button`** read-only property indicates which button was pressed or released on the mouse to trigger the event.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/button)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[button](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#button)

### `Readonly`buttons[](#buttons)

buttons: number

The **`MouseEvent.buttons`** read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/buttons)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[buttons](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#buttons)

### `Readonly`cancelable[](#cancelable)

cancelable: boolean

The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[cancelable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#cancelable)

### cancelBubble[](#cancelbubble)

cancelBubble: boolean

The **`cancelBubble`** property of the Event interface is deprecated. Use Event.stopPropagation() instead. Setting its value to true before returning from an event handler prevents propagation of the event. In later implementations, setting this to false does nothing. See Browser compatibility for details.

#### Deprecated[](#deprecated)

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[cancelBubble](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#cancelbubble)

### `Readonly`CAPTURING\_PHASE[](#capturing_phase)

CAPTURING\_PHASE: 1

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[CAPTURING\_PHASE](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#capturing_phase)

### `Readonly`clientX[](#clientx)

clientX: number

The **`clientX`** read-only property of the MouseEvent interface provides the horizontal coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/clientX)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[clientX](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#clientx)

### `Readonly`clientY[](#clienty)

clientY: number

The **`clientY`** read-only property of the MouseEvent interface provides the vertical coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/clientY)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[clientY](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#clienty)

### `Readonly`composed[](#composed)

composed: boolean

The read-only **`composed`** property of the Event interface returns a boolean value which indicates whether or not the event will propagate across the shadow DOM boundary into the standard DOM.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[composed](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#composed)

### `Readonly`ctrlKey[](#ctrlkey)

ctrlKey: boolean

The **`MouseEvent.ctrlKey`** read-only property is a boolean value that indicates whether the ctrl key was pressed or not when a given mouse event occurs.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/ctrlKey)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[ctrlKey](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#ctrlkey)

### `Readonly`currentTarget[](#currenttarget)

currentTarget: EventTarget | null

The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)

Inherited from [KeyboardEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.KeyboardEvent/).[currentTarget](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.KeyboardEvent/#currenttarget)

### `Readonly`defaultPrevented[](#defaultprevented)

defaultPrevented: boolean

The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[defaultPrevented](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#defaultprevented)

### `Readonly`detail[](#detail)

detail: number

The **`UIEvent.detail`** read-only property, when non-zero, provides the current (or next, depending on the event) click count.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/UIEvent/detail)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[detail](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#detail)

### `Readonly`eventPhase[](#eventphase)

eventPhase: number

The **`eventPhase`** read-only property of the Event interface indicates which phase of the event flow is currently being evaluated.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[eventPhase](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#eventphase)

### `Readonly`height[](#height)

height: number

The **`height`** read-only property of the PointerEvent interface represents the height of the pointer's contact geometry, along the y-axis (in CSS pixels). Depending on the source of the pointer device (for example a finger), for a given pointer, each event may produce a different value.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/height)

### `Readonly`isPrimary[](#isprimary)

isPrimary: boolean

The **`isPrimary`** read-only property of the PointerEvent interface indicates whether or not the pointer device that created the event is the primary pointer. It returns true if the pointer that caused the event to be fired is the primary one and returns false otherwise.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/isPrimary)

### `Readonly`isTrusted[](#istrusted)

isTrusted: boolean

The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[isTrusted](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#istrusted)

### `Readonly`layerX[](#layerx)

layerX: number

The **`MouseEvent.layerX`** read-only property returns the horizontal coordinate of the event relative to the current layer.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/layerX)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[layerX](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#layerx)

### `Readonly`layerY[](#layery)

layerY: number

The **`MouseEvent.layerY`** read-only property returns the vertical coordinate of the event relative to the current layer.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/layerY)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[layerY](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#layery)

### `Readonly`metaKey[](#metakey)

metaKey: boolean

The **`MouseEvent.metaKey`** read-only property is a boolean value that indicates whether the meta key was pressed or not when a given mouse event occurs.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/metaKey)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[metaKey](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#metakey)

### `Readonly`movementX[](#movementx)

movementX: number

The **`movementX`** read-only property of the MouseEvent interface provides the difference in the X coordinate of the mouse (or pointer) between the given move event and the previous move event of the same type.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/movementX)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[movementX](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#movementx)

### `Readonly`movementY[](#movementy)

movementY: number

The **`movementY`** read-only property of the MouseEvent interface provides the difference in the Y coordinate of the mouse (or pointer) between the given move event and the previous move event of the same type.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/movementY)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[movementY](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#movementy)

### `Readonly`NONE[](#none)

NONE: 0

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[NONE](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#none)

### `Readonly`offsetX[](#offsetx)

offsetX: number

The **`offsetX`** read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/offsetX)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[offsetX](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#offsetx)

### `Readonly`offsetY[](#offsety)

offsetY: number

The **`offsetY`** read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/offsetY)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[offsetY](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#offsety)

### `Readonly`pageX[](#pagex)

pageX: number

The **`pageX`** read-only property of the MouseEvent interface returns the X (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document. This includes any portion of the document not currently visible.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/pageX)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[pageX](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#pagex)

### `Readonly`pageY[](#pagey)

pageY: number

The **`pageY`** read-only property of the MouseEvent interface returns the Y (vertical) coordinate (in pixels) at which the mouse was clicked, relative to the top edge of the entire document. This includes any portion of the document not currently visible.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/pageY)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[pageY](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#pagey)

### `Readonly`persistentDeviceId[](#persistentdeviceid)

persistentDeviceId: number

The **`persistentDeviceId`** read-only property of the PointerEvent interface is a unique identifier for the pointing device generating the PointerEvent. This provides a secure, reliable way to identify multiple pointing devices (such as pens) interacting with the screen simultaneously.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/persistentDeviceId)

### `Readonly`pointerId[](#pointerid)

pointerId: number

The **`pointerId`** read-only property of the PointerEvent interface is an identifier assigned to the pointer that triggered the event. The identifier is unique, being different from the identifiers of all other active pointer events.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/pointerId)

### `Readonly`pointerType[](#pointertype)

pointerType: string

The **`pointerType`** read-only property of the PointerEvent interface indicates the device type (mouse, pen, or touch) that caused a given pointer event.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/pointerType)

### `Readonly`pressure[](#pressure)

pressure: number

The **`pressure`** read-only property of the PointerEvent interface indicates the normalized pressure of the pointer input.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/pressure)

### `Readonly`relatedTarget[](#relatedtarget)

relatedTarget: EventTarget | null

The **`MouseEvent.relatedTarget`** read-only property is the secondary target for the mouse event, if there is one.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/relatedTarget)

Inherited from PointerEvent.[relatedTarget](#relatedtarget)

### returnValue[](#returnvalue)

returnValue: boolean

The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.

#### Deprecated[](#deprecated-1)

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[returnValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#returnvalue)

### `Readonly`screenX[](#screenx)

screenX: number

The **`screenX`** read-only property of the MouseEvent interface provides the horizontal coordinate (offset) of the mouse pointer in screen coordinates.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/screenX)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[screenX](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#screenx)

### `Readonly`screenY[](#screeny)

screenY: number

The **`screenY`** read-only property of the MouseEvent interface provides the vertical coordinate (offset) of the mouse pointer in screen coordinates.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/screenY)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[screenY](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#screeny)

### `Readonly`shiftKey[](#shiftkey)

shiftKey: boolean

The **`MouseEvent.shiftKey`** read-only property is a boolean value that indicates whether the shift key was pressed or not when a given mouse event occurs.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/shiftKey)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[shiftKey](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#shiftkey)

### `Readonly`srcElement[](#srcelement)

srcElement: EventTarget | null

The deprecated **`Event.srcElement`** is an alias for the Event.target property. Use Event.target instead.

#### Deprecated[](#deprecated-2)

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)

Inherited from [KeyboardEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.KeyboardEvent/).[srcElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.KeyboardEvent/#srcelement)

### `Readonly`tangentialPressure[](#tangentialpressure)

tangentialPressure: number

The **`tangentialPressure`** read-only property of the PointerEvent interface represents the normalized tangential pressure of the pointer input (also known as barrel pressure or cylinder stress).

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/tangentialPressure)

### `Readonly`target[](#target)

target: EventTarget | null

The read-only **`target`** property of the Event interface is a reference to the object onto which the event was dispatched. It is different from Event.currentTarget when the event handler is called during the bubbling or capturing phase of the event.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)

Inherited from [KeyboardEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.KeyboardEvent/).[target](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.KeyboardEvent/#target)

### `Readonly`tiltX[](#tiltx)

tiltX: number

The **`tiltX`** read-only property of the PointerEvent interface is the angle (in degrees) between the Y-Z plane of the pointer and the screen. This property is typically only useful for a pen/stylus pointer type.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/tiltX)

### `Readonly`tiltY[](#tilty)

tiltY: number

The **`tiltY`** read-only property of the PointerEvent interface is the angle (in degrees) between the X-Z plane of the pointer and the screen. This property is typically only useful for a pen/stylus pointer type.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/tiltY)

### `Readonly`timeStamp[](#timestamp)

timeStamp: number

The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[timeStamp](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#timestamp)

### `Readonly`twist[](#twist)

twist: number

The **`twist`** read-only property of the PointerEvent interface represents the clockwise rotation of the pointer (e.g., pen stylus) around its major axis, in degrees.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/twist)

### `Readonly`type[](#type)

type: string

The **`type`** read-only property of the Event interface returns a string containing the event's type. It is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[type](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#type)

### `Readonly`view[](#view)

view: [Window](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Window/) | null

The **`UIEvent.view`** read-only property returns the WindowProxy object from which the event was generated. In browsers, this is the Window object the event happened in.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/UIEvent/view)

Inherited from [TextEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextEvent/).[view](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.TextEvent/#view)

### `Readonly`which[](#which)

which: number

The **`UIEvent.which`** read-only property of the UIEvent interface returns a number that indicates which button was pressed on the mouse, or the numeric keyCode or the character code (charCode) of the key pressed on the keyboard.

#### Deprecated[](#deprecated-3)

[MDN Reference](https://developer.mozilla.org/docs/Web/API/UIEvent/which)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[which](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#which)

### `Readonly`width[](#width)

width: number

The **`width`** read-only property of the PointerEvent interface represents the width of the pointer's contact geometry along the x-axis, measured in CSS pixels. Depending on the source of the pointer device (such as a finger), for a given pointer, each event may produce a different value.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/width)

### `Readonly`x[](#x)

x: number

The **`MouseEvent.x`** property is an alias for the MouseEvent.clientX property.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/x)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[x](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#x)

### `Readonly`y[](#y)

y: number

The **`MouseEvent.y`** property is an alias for the MouseEvent.clientY property.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/y)

Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[y](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#y)

## Methods[](#methods-1)

### composedPath[](#composedpath)

-   composedPath(): EventTarget\[\][](#composedpath-1)
    
    The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked. This does not include nodes in shadow trees if the shadow root was created with its ShadowRoot.mode closed.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
    
    #### Returns EventTarget\[\]
    
    Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[composedPath](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#composedpath)
    

### getCoalescedEvents[](#getcoalescedevents)

-   getCoalescedEvents(): PointerEvent\[\][](#getcoalescedevents-1)
    
    The **`getCoalescedEvents()`** method of the PointerEvent interface returns a sequence of PointerEvent instances that were coalesced (merged) into a single pointermove or pointerrawupdate event. Instead of a stream of many pointermove events, user agents coalesce multiple updates into a single event. This helps with performance as the user agent has less event handling to perform, but there is a reduction in the granularity and accuracy when tracking, especially with fast and large movements. Available only in secure contexts.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/getCoalescedEvents)
    
    #### Returns PointerEvent\[\]
    

### getModifierState[](#getmodifierstate)

-   getModifierState(keyArg: string): boolean[](#getmodifierstate-1)
    
    The **`MouseEvent.getModifierState()`** method returns the current state of the specified modifier key: true if the modifier is active (i.e., the modifier key is pressed or locked), otherwise, false.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/getModifierState)
    
    #### Parameters
    
    -   keyArg: string
    
    #### Returns boolean
    
    Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[getModifierState](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#getmodifierstate)
    

### getPredictedEvents[](#getpredictedevents)

-   getPredictedEvents(): PointerEvent\[\][](#getpredictedevents-1)
    
    The **`getPredictedEvents()`** method of the PointerEvent interface returns a sequence of PointerEvent instances that are estimated future pointer positions. How the predicted positions are calculated depends on the user agent, but they are based on past points, current velocity, and trajectory.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/PointerEvent/getPredictedEvents)
    
    #### Returns PointerEvent\[\]
    

### initEvent[](#initevent)

-   initEvent(type: string, bubbles?: boolean, cancelable?: boolean): void[](#initevent-1)
    
    The **`Event.initEvent()`** method is used to initialize the value of an event created using Document.createEvent().
    
    #### Parameters
    
    -   type: string
    -   `Optional`bubbles: boolean
    -   `Optional`cancelable: boolean
    
    #### Returns void
    
    #### Deprecated[](#deprecated-4)
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/initEvent)
    
    Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[initEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#initevent)
    

### initMouseEvent[](#initmouseevent)

-   initMouseEvent(  
        typeArg: string,  
        canBubbleArg: boolean,  
        cancelableArg: boolean,  
        viewArg: [Window](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Window/),  
        detailArg: number,  
        screenXArg: number,  
        screenYArg: number,  
        clientXArg: number,  
        clientYArg: number,  
        ctrlKeyArg: boolean,  
        altKeyArg: boolean,  
        shiftKeyArg: boolean,  
        metaKeyArg: boolean,  
        buttonArg: number,  
        relatedTargetArg: EventTarget | null,  
    ): void[](#initmouseevent-1)
    
    The **`MouseEvent.initMouseEvent()`** method initializes the value of a mouse event once it's been created (normally using the Document.createEvent() method).
    
    #### Parameters
    
    -   typeArg: string
    -   canBubbleArg: boolean
    -   cancelableArg: boolean
    -   viewArg: [Window](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Window/)
    -   detailArg: number
    -   screenXArg: number
    -   screenYArg: number
    -   clientXArg: number
    -   clientYArg: number
    -   ctrlKeyArg: boolean
    -   altKeyArg: boolean
    -   shiftKeyArg: boolean
    -   metaKeyArg: boolean
    -   buttonArg: number
    -   relatedTargetArg: EventTarget | null
    
    #### Returns void
    
    #### Deprecated[](#deprecated-5)
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/MouseEvent/initMouseEvent)
    
    Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[initMouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#initmouseevent)
    

### initUIEvent[](#inituievent)

-   initUIEvent(  
        typeArg: string,  
        bubblesArg?: boolean,  
        cancelableArg?: boolean,  
        viewArg?: [Window](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Window/) | null,  
        detailArg?: number,  
    ): void[](#inituievent-1)
    
    The **`UIEvent.initUIEvent()`** method initializes a UI event once it's been created.
    
    #### Parameters
    
    -   typeArg: string
    -   `Optional`bubblesArg: boolean
    -   `Optional`cancelableArg: boolean
    -   `Optional`viewArg: [Window](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Window/) | null
    -   `Optional`detailArg: number
    
    #### Returns void
    
    #### Deprecated[](#deprecated-6)
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/UIEvent/initUIEvent)
    
    Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[initUIEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#inituievent)
    

### preventDefault[](#preventdefault)

-   preventDefault(): void[](#preventdefault-1)
    
    The **`preventDefault()`** method of the Event interface tells the user agent that the event is being explicitly handled, so its default action, such as page scrolling, link navigation, or pasting text, should not be taken.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
    
    #### Returns void
    
    Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[preventDefault](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#preventdefault)
    

### stopImmediatePropagation[](#stopimmediatepropagation)

-   stopImmediatePropagation(): void[](#stopimmediatepropagation-1)
    
    The **`stopImmediatePropagation()`** method of the Event interface prevents other listeners of the same event from being called.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
    
    #### Returns void
    
    Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[stopImmediatePropagation](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#stopimmediatepropagation)
    

### stopPropagation[](#stoppropagation)

-   stopPropagation(): void[](#stoppropagation-1)
    
    The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. It does not, however, prevent any default behaviors from occurring; for instance, clicks on links are still processed. If you want to stop those behaviors, see the preventDefault() method. It also does not prevent propagation to other event-handlers of the current element. If you want to stop those, see stopImmediatePropagation().
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
    
    #### Returns void
    
    Inherited from [MouseEvent](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/).[stopPropagation](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MouseEvent/#stoppropagation)
