跳转到内容

LyricLineMouseEvent

Defined in: packages/core/src/lyric-player/dom/index.ts:16

歌词行鼠标相关事件,可以获取到歌词行的索引和歌词行元素

  • MouseEvent

new LyricLineMouseEvent(
lineIndex,
line,
event): LyricLineMouseEvent;

Defined in: packages/core/src/lyric-player/dom/index.ts:17

ParameterTypeDescription
lineIndexnumber歌词行索引
lineLyricLineBase歌词行元素
eventMouseEvent-

LyricLineMouseEvent

MouseEvent.constructor
PropertyModifierTypeDescriptionInherited fromDefined in
altKeyreadonlybooleanThe 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 ReferenceMouseEvent.altKeynode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20935
AT_TARGETreadonly2-MouseEvent.AT_TARGETnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11462
bubblesreadonlybooleanThe bubbles read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not. MDN ReferenceMouseEvent.bubblesnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11353
BUBBLING_PHASEreadonly3-MouseEvent.BUBBLING_PHASEnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11463
buttonreadonlynumberThe MouseEvent.button read-only property indicates which button was pressed or released on the mouse to trigger the event. MDN ReferenceMouseEvent.buttonnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20941
buttonsreadonlynumberThe MouseEvent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered. MDN ReferenceMouseEvent.buttonsnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20947
cancelablereadonlybooleanThe 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 ReferenceMouseEvent.cancelablenode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11366
cancelBubblepublicbooleanThe cancelBubble property of the Event interface is deprecated. Deprecated MDN ReferenceMouseEvent.cancelBubblenode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11360
CAPTURING_PHASEreadonly1-MouseEvent.CAPTURING_PHASEnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11461
clientXreadonlynumberThe 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 ReferenceMouseEvent.clientXnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20953
clientYreadonlynumberThe 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 ReferenceMouseEvent.clientYnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20959
composedreadonlybooleanThe read-only composed property of the or not the event will propagate across the shadow DOM boundary into the standard DOM. MDN ReferenceMouseEvent.composednode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11372
ctrlKeyreadonlybooleanThe 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 ReferenceMouseEvent.ctrlKeynode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20965
currentTargetreadonlyEventTarget | nullThe currentTarget read-only property of the Event interface identifies the element to which the event handler has been attached. MDN ReferenceMouseEvent.currentTargetnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11378
defaultPreventedreadonlybooleanThe 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 ReferenceMouseEvent.defaultPreventednode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11384
detailreadonlynumberThe UIEvent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count. MDN ReferenceMouseEvent.detailnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:32607
eventPhasereadonlynumberThe eventPhase read-only property of the being evaluated. MDN ReferenceMouseEvent.eventPhasenode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11390
isTrustedreadonlybooleanThe isTrusted read-only property of the 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 The only exception is the click event, which initializes the isTrusted property to false in user agents. MDN ReferenceMouseEvent.isTrustednode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11396
layerXreadonlynumberThe MouseEvent.layerX read-only property returns the horizontal coordinate of the event relative to the current layer. MDN ReferenceMouseEvent.layerXnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20971
layerYreadonlynumberThe MouseEvent.layerY read-only property returns the vertical coordinate of the event relative to the current layer. MDN ReferenceMouseEvent.layerYnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20977
linereadonlyLyricLineBase歌词行元素-packages/core/src/lyric-player/dom/index.ts:25
lineIndexreadonlynumber歌词行索引-packages/core/src/lyric-player/dom/index.ts:21
metaKeyreadonlybooleanThe 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 ReferenceMouseEvent.metaKeynode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20983
movementXreadonlynumberThe movementX read-only property of the MouseEvent interface provides the difference in the X coordinate of the mouse pointer between the given event and the previous Element/mousemove_event event. MDN ReferenceMouseEvent.movementXnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20989
movementYreadonlynumberThe movementY read-only property of the MouseEvent interface provides the difference in the Y coordinate of the mouse pointer between the given event and the previous Element/mousemove_event event. MDN ReferenceMouseEvent.movementYnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:20995
NONEreadonly0-MouseEvent.NONEnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11460
offsetXreadonlynumberThe 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 ReferenceMouseEvent.offsetXnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21001
offsetYreadonlynumberThe 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 ReferenceMouseEvent.offsetYnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21007
pageXreadonlynumberThe 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. MDN ReferenceMouseEvent.pageXnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21013
pageYreadonlynumberThe 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. MDN ReferenceMouseEvent.pageYnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21019
relatedTargetreadonlyEventTarget | nullThe MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one. MDN ReferenceMouseEvent.relatedTargetnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21025
returnValuepublicbooleanThe Event property returnValue indicates whether the default action for this event has been prevented or not. Deprecated MDN ReferenceMouseEvent.returnValuenode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11403
screenXreadonlynumberThe screenX read-only property of the MouseEvent interface provides the horizontal coordinate (offset) of the mouse pointer in screen coordinates. MDN ReferenceMouseEvent.screenXnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21031
screenYreadonlynumberThe screenY read-only property of the MouseEvent interface provides the vertical coordinate (offset) of the mouse pointer in screen coordinates. MDN ReferenceMouseEvent.screenYnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21037
shiftKeyreadonlybooleanThe 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 ReferenceMouseEvent.shiftKeynode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21043
srcElementreadonlyEventTarget | nullThe deprecated Event.srcElement is an alias for the Event.target property. Deprecated MDN ReferenceMouseEvent.srcElementnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11410
targetreadonlyEventTarget | nullThe read-only target property of the dispatched. MDN ReferenceMouseEvent.targetnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11416
timeStampreadonlynumberThe timeStamp read-only property of the Event interface returns the time (in milliseconds) at which the event was created. MDN ReferenceMouseEvent.timeStampnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11422
typereadonlystringThe type read-only property of the Event interface returns a string containing the event’s type. MDN ReferenceMouseEvent.typenode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11428
viewreadonlyWindow | nullThe UIEvent.view read-only property returns the is the Window object the event happened in. MDN ReferenceMouseEvent.viewnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:32613
whichreadonlynumberThe 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 MDN ReferenceMouseEvent.whichnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:32620
xreadonlynumberThe MouseEvent.x property is an alias for the MouseEvent.clientX property. MDN ReferenceMouseEvent.xnode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21049
yreadonlynumberThe MouseEvent.y property is an alias for the MouseEvent.clientY property. MDN ReferenceMouseEvent.ynode_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21055

composedPath(): EventTarget[];

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11434

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.

MDN Reference

EventTarget[]

MouseEvent.composedPath

getModifierState(keyArg): boolean;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21061

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

ParameterType
keyArgstring

boolean

MouseEvent.getModifierState

initEvent(
type,
bubbles?,
cancelable?): void;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11441

The Event.initEvent() method is used to initialize the value of an event created using Document.createEvent().

ParameterType
typestring
bubbles?boolean
cancelable?boolean

void

MDN Reference

MouseEvent.initEvent

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

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:21068

The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it’s been created (normally using the Document.createEvent() method).

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

void

MDN Reference

MouseEvent.initMouseEvent

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

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:32627

The UIEvent.initUIEvent() method initializes a UI event once it’s been created.

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

void

MDN Reference

MouseEvent.initUIEvent

preventDefault(): void;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11447

The preventDefault() method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.

MDN Reference

void

MouseEvent.preventDefault

stopImmediatePropagation(): void;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11453

The stopImmediatePropagation() method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.

MDN Reference

void

MouseEvent.stopImmediatePropagation

stopPropagation(): void;

Defined in: node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.dom.d.ts:11459

The stopPropagation() method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.

MDN Reference

void

MouseEvent.stopPropagation