@univerjs/engine-render v0.5.0-beta.1Docs


Interface: IMouseEvent

Native friendly interface for MouseEvent Object

Extends

Extended by

Properties

PropertyModifierTypeDescriptionOverridesInherited fromDefined in
altKeypublicbooleanStatus of Alt key being pressedMouseEvent.altKey-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:189
AT_TARGETreadonly2--IUIEvent.AT_TARGETnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8192
bubblesreadonlybooleanReturns true or false depending on how event was initialized. True if event goes through its target’s ancestors in reverse tree order, and false otherwise. MDN Reference-IUIEvent.bubblesnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8087
BUBBLING_PHASEreadonly3--IUIEvent.BUBBLING_PHASEnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8193
buttonpublicnumberValue of single mouse button pressedMouseEvent.button-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:194
buttonspublicnumberValue of all mouse buttons pressedMouseEvent.buttons-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:199
cancelablereadonlybooleanReturns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method. MDN Reference-IUIEvent.cancelablenode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8099
cancelBubblepublicbooleanDeprecated MDN Reference-IUIEvent.cancelBubblenode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8093
CAPTURING_PHASEreadonly1--IUIEvent.CAPTURING_PHASEnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8191
clientXpublicnumberCurrent X coordinateMouseEvent.clientX-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:204
clientYpublicnumberCurrent Y coordinateMouseEvent.clientY-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:209
composedreadonlybooleanReturns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise. MDN Reference-IUIEvent.composednode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8105
ctrlKeypublicbooleanStatus of Ctrl key being pressedMouseEvent.ctrlKey-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:214
currentStatepublicNullable<number>Current state of given input-IUIEvent.currentStatepackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:122
currentTargetreadonlynull | EventTargetReturns the object whose event listener’s callback is currently being invoked. MDN Reference-IUIEvent.currentTargetnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8111
defaultPreventedreadonlybooleanReturns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. MDN Reference-IUIEvent.defaultPreventednode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8117
detailreadonlynumberMDN Reference-IUIEvent.detailnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:22316
deviceTypepublicDeviceTypeDevice type-IUIEvent.deviceTypepackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:110
eventPhasereadonlynumberReturns the event’s phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. MDN Reference-IUIEvent.eventPhasenode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8123
inputIndexpublicnumberDevice slot-IUIEvent.inputIndexpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:114
isTrustedreadonlybooleanReturns true if event was dispatched by the user agent, and false otherwise. MDN Reference-IUIEvent.isTrustednode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8129
layerXreadonlynumberMDN Reference-MouseEvent.layerXnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:15355
layerYreadonlynumberMDN Reference-MouseEvent.layerYnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:15357
metaKeypublicbooleanStatus of Meta key (eg. Windows key) being pressedMouseEvent.metaKey-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:219
movementXpublicnumberDelta of movement on X axisMouseEvent.movementX-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:224
movementYpublicnumberDelta of movement on Y axisMouseEvent.movementY-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:229
mozMovementX?publicnumberDelta of movement on X axis--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:234
mozMovementY?publicnumberDelta of movement on Y axis--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:239
msMovementX?publicanyDelta of movement on X axis--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:244
msMovementY?publicanyDelta of movement on Y axi s--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:249
NONEreadonly0--IUIEvent.NONEnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8190
offsetXpublicnumberCurrent coordinate of X within containerMouseEvent.offsetX-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:254
offsetYpublicnumberCurrent coordinate of Y within containerMouseEvent.offsetY-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:259
pageXreadonlynumberMDN Reference-MouseEvent.pageXnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:15369
pageYreadonlynumberMDN Reference-MouseEvent.pageYnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:15371
previousStatepublicNullable<number>Previous state of given input, for what???, nobody read this value.-IUIEvent.previousStatepackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:118
relatedTargetreadonlynull | EventTargetMDN Reference-MouseEvent.relatedTargetnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:15373
returnValuepublicbooleanDeprecated MDN Reference-IUIEvent.returnValuenode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8135
screenXreadonlynumberMDN Reference-MouseEvent.screenXnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:15375
screenYreadonlynumberMDN Reference-MouseEvent.screenYnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:15377
shiftKeypublicbooleanStatus of Shift key being pressedMouseEvent.shiftKey-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:264
srcElementreadonlynull | EventTargetDeprecated MDN Reference-IUIEvent.srcElementnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8141
targetreadonlynull | EventTargetReturns the object to which event is dispatched (its target). MDN Reference-IUIEvent.targetnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8147
timeStampreadonlynumberReturns the event’s timestamp as the number of milliseconds measured relative to the time origin. MDN Reference-IUIEvent.timeStampnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8153
typereadonlystringReturns the type of event, e.g. “click”, “hashchange”, or “submit”. MDN Reference-IUIEvent.typenode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8159
viewreadonlynull | WindowMDN Reference-IUIEvent.viewnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:22318
webkitMovementX?publicanyDelta of movement on X axis--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:269
webkitMovementY?publicanyDelta of movement on Y axis--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:274
whichreadonlynumberDeprecated MDN Reference-IUIEvent.whichnode_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:22324
xpublicnumberAlias of clientXMouseEvent.x-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:279
ypublicnumberAlias of clientYMouseEvent.y-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/basics/i-events.ts:284

Methods

composedPath()

composedPath(undefined)

composedPath(): EventTarget[]

Returns the invocation target objects of event’s path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root’s mode is “closed” that are not reachable from event’s currentTarget.

MDN Reference

Returns

EventTarget[]

Inherited from

IUIEvent.composedPath

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8165

composedPath(undefined)

composedPath(): EventTarget[]

Returns the invocation target objects of event’s path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root’s mode is “closed” that are not reachable from event’s currentTarget.

MDN Reference

Returns

EventTarget[]

Inherited from

IUIEvent.composedPath

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.webworker.d.ts:2473


getModifierState()

getModifierState(keyArg): boolean

MDN Reference

Parameters

ParameterType
keyArgstring

Returns

boolean

Inherited from

MouseEvent.getModifierState

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:15385


initEvent()

initEvent(type, bubbles, cancelable)

initEvent(
   type, 
   bubbles?, 
   cancelable?): void
Parameters
ParameterType
typestring
bubbles?boolean
cancelable?boolean
Returns

void

Deprecated

MDN Reference

Inherited from

IUIEvent.initEvent

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8171

initEvent(type, bubbles, cancelable)

initEvent(
   type, 
   bubbles?, 
   cancelable?): void
Parameters
ParameterType
typestring
bubbles?boolean
cancelable?boolean
Returns

void

Deprecated

MDN Reference

Inherited from

IUIEvent.initEvent

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.webworker.d.ts:2479


initMouseEvent()

initMouseEvent(
   typeArg, 
   canBubbleArg, 
   cancelableArg, 
   viewArg, 
   detailArg, 
   screenXArg, 
   screenYArg, 
   clientXArg, 
   clientYArg, 
   ctrlKeyArg, 
   altKeyArg, 
   shiftKeyArg, 
   metaKeyArg, 
   buttonArg, 
   relatedTargetArg): void

Parameters

ParameterType
typeArgstring
canBubbleArgboolean
cancelableArgboolean
viewArgWindow
detailArgnumber
screenXArgnumber
screenYArgnumber
clientXArgnumber
clientYArgnumber
ctrlKeyArgboolean
altKeyArgboolean
shiftKeyArgboolean
metaKeyArgboolean
buttonArgnumber
relatedTargetArgnull | EventTarget

Returns

void

Deprecated

MDN Reference

Inherited from

MouseEvent.initMouseEvent

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:15391


initUIEvent()

initUIEvent(
   typeArg, 
   bubblesArg?, 
   cancelableArg?, 
   viewArg?, 
   detailArg?): void

Parameters

ParameterType
typeArgstring
bubblesArg?boolean
cancelableArg?boolean
viewArg?null | Window
detailArg?number

Returns

void

Deprecated

MDN Reference

Inherited from

IUIEvent.initUIEvent

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:22330


preventDefault()

preventDefault(undefined)

preventDefault(): void

If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.

MDN Reference

Returns

void

Inherited from

IUIEvent.preventDefault

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8177

preventDefault(undefined)

preventDefault(): void

If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.

MDN Reference

Returns

void

Inherited from

IUIEvent.preventDefault

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.webworker.d.ts:2485


stopImmediatePropagation()

stopImmediatePropagation(undefined)

stopImmediatePropagation(): void

Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.

MDN Reference

Returns

void

Inherited from

IUIEvent.stopImmediatePropagation

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8183

stopImmediatePropagation(undefined)

stopImmediatePropagation(): void

Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.

MDN Reference

Returns

void

Inherited from

IUIEvent.stopImmediatePropagation

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.webworker.d.ts:2491


stopPropagation()

stopPropagation(undefined)

stopPropagation(): void

When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.

MDN Reference

Returns

void

Inherited from

IUIEvent.stopPropagation

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.dom.d.ts:8189

stopPropagation(undefined)

stopPropagation(): void

When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.

MDN Reference

Returns

void

Inherited from

IUIEvent.stopPropagation

Defined in

node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/lib/lib.webworker.d.ts:2497