LyricLineMouseEvent
This content is not available in your language yet.
Defined in: packages/core/src/lyric-player/dom/index.ts:18
歌词行鼠标相关事件,可以获取到歌词行的索引、主歌词行以及背景歌词行(如果有)元素
Extends
Section titled “Extends”MouseEvent
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LyricLineMouseEvent( lineIndex, line, bgLine, event): LyricLineMouseEvent;Defined in: packages/core/src/lyric-player/dom/index.ts:24
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
lineIndex | number | 歌词行索引 |
line | LyricLineBase | 歌词行元素 |
bgLine | LyricLineBase | undefined | 背景人声歌词行元素 (如果存在) |
event | MouseEvent | - |
Returns
Section titled “Returns”LyricLineMouseEvent
Overrides
Section titled “Overrides”MouseEvent.constructorProperties
Section titled “Properties”| Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
|---|---|---|---|---|---|---|
altKey | readonly | boolean | undefined | 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 | MouseEvent.altKey | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25020 |
AT_TARGET | readonly | 2 | undefined | - | MouseEvent.AT_TARGET | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14273 |
bgLine | readonly | LyricLineBase | undefined | undefined | 背景人声歌词行元素 (如果存在) | - | packages/core/src/lyric-player/dom/index.ts:36 |
bubbles | readonly | boolean | undefined | The bubbles read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not. MDN Reference | MouseEvent.bubbles | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14164 |
BUBBLING_PHASE | readonly | 3 | undefined | - | MouseEvent.BUBBLING_PHASE | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14274 |
button | readonly | number | undefined | The MouseEvent.button read-only property indicates which button was pressed or released on the mouse to trigger the event. MDN Reference | MouseEvent.button | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25026 |
buttons | readonly | number | undefined | 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 | MouseEvent.buttons | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25032 |
cancelable | readonly | boolean | undefined | 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 | MouseEvent.cancelable | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14177 |
cancelBubble | public | boolean | undefined | 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 MDN Reference | MouseEvent.cancelBubble | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14171 |
CAPTURING_PHASE | readonly | 1 | undefined | - | MouseEvent.CAPTURING_PHASE | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14272 |
clientX | readonly | number | undefined | 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 | MouseEvent.clientX | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25038 |
clientY | readonly | number | undefined | 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 | MouseEvent.clientY | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25044 |
composed | readonly | boolean | undefined | 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 | MouseEvent.composed | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14183 |
ctrlKey | readonly | boolean | undefined | 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 | MouseEvent.ctrlKey | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25050 |
currentTarget | readonly | EventTarget | null | undefined | The currentTarget read-only property of the Event interface identifies the element to which the event handler has been attached. MDN Reference | MouseEvent.currentTarget | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14189 |
defaultPrevented | readonly | boolean | undefined | 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 | MouseEvent.defaultPrevented | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14195 |
detail | readonly | number | undefined | The UIEvent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count. MDN Reference | MouseEvent.detail | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:37281 |
eventPhase | readonly | number | undefined | The eventPhase read-only property of the Event interface indicates which phase of the event flow is currently being evaluated. MDN Reference | MouseEvent.eventPhase | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14201 |
isPropagationStopped | public | boolean | false | 自定义标志位,用于记录外部是否调用了 stopPropagation | - | packages/core/src/lyric-player/dom/index.ts:22 |
isTrusted | readonly | boolean | undefined | 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 | MouseEvent.isTrusted | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14207 |
layerX | readonly | number | undefined | The MouseEvent.layerX read-only property returns the horizontal coordinate of the event relative to the current layer. MDN Reference | MouseEvent.layerX | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25056 |
layerY | readonly | number | undefined | The MouseEvent.layerY read-only property returns the vertical coordinate of the event relative to the current layer. MDN Reference | MouseEvent.layerY | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25062 |
line | readonly | LyricLineBase | undefined | 歌词行元素 | - | packages/core/src/lyric-player/dom/index.ts:32 |
lineIndex | readonly | number | undefined | 歌词行索引 | - | packages/core/src/lyric-player/dom/index.ts:28 |
metaKey | readonly | boolean | undefined | 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 | MouseEvent.metaKey | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25068 |
movementX | readonly | number | undefined | 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 | MouseEvent.movementX | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25074 |
movementY | readonly | number | undefined | 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 | MouseEvent.movementY | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25080 |
NONE | readonly | 0 | undefined | - | MouseEvent.NONE | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14271 |
offsetX | readonly | number | undefined | 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 | MouseEvent.offsetX | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25086 |
offsetY | readonly | number | undefined | 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 | MouseEvent.offsetY | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25092 |
pageX | readonly | number | undefined | 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 | MouseEvent.pageX | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25098 |
pageY | readonly | number | undefined | 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 | MouseEvent.pageY | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25104 |
relatedTarget | readonly | EventTarget | null | undefined | The MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one. MDN Reference | MouseEvent.relatedTarget | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25110 |
returnValue | public | boolean | undefined | The Event property returnValue indicates whether the default action for this event has been prevented or not. Deprecated MDN Reference | MouseEvent.returnValue | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14214 |
screenX | readonly | number | undefined | The screenX read-only property of the MouseEvent interface provides the horizontal coordinate (offset) of the mouse pointer in screen coordinates. MDN Reference | MouseEvent.screenX | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25116 |
screenY | readonly | number | undefined | The screenY read-only property of the MouseEvent interface provides the vertical coordinate (offset) of the mouse pointer in screen coordinates. MDN Reference | MouseEvent.screenY | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25122 |
shiftKey | readonly | boolean | undefined | 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 | MouseEvent.shiftKey | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25128 |
srcElement | readonly | EventTarget | null | undefined | The deprecated Event.srcElement is an alias for the Event.target property. Use Event.target instead. Deprecated MDN Reference | MouseEvent.srcElement | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14221 |
target | readonly | EventTarget | null | undefined | 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 | MouseEvent.target | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14227 |
timeStamp | readonly | number | undefined | The timeStamp read-only property of the Event interface returns the time (in milliseconds) at which the event was created. MDN Reference | MouseEvent.timeStamp | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14233 |
type | readonly | string | undefined | 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 | MouseEvent.type | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14239 |
view | readonly | Window | null | undefined | 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 | MouseEvent.view | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:37287 |
which | readonly | number | undefined | 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 MDN Reference | MouseEvent.which | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:37294 |
x | readonly | number | undefined | The MouseEvent.x property is an alias for the MouseEvent.clientX property. MDN Reference | MouseEvent.x | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25134 |
y | readonly | number | undefined | The MouseEvent.y property is an alias for the MouseEvent.clientY property. MDN Reference | MouseEvent.y | node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25140 |
Methods
Section titled “Methods”composedPath()
Section titled “composedPath()”composedPath(): EventTarget[];Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14245
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.
Returns
Section titled “Returns”EventTarget[]
Inherited from
Section titled “Inherited from”MouseEvent.composedPathgetModifierState()
Section titled “getModifierState()”getModifierState(keyArg): boolean;Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25146
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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
keyArg | string |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”MouseEvent.getModifierStateinitEvent()
Section titled “initEvent()”initEvent( type, bubbles?, cancelable?): void;Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14252
The Event.initEvent() method is used to initialize the value of an event created using Document.createEvent().
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | string |
bubbles? | boolean |
cancelable? | boolean |
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”Inherited from
Section titled “Inherited from”MouseEvent.initEventinitMouseEvent()
Section titled “initMouseEvent()”initMouseEvent( typeArg, canBubbleArg, cancelableArg, viewArg, detailArg, screenXArg, screenYArg, clientXArg, clientYArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, buttonArg, relatedTargetArg): void;Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:25153
The MouseEvent.initMouseEvent() method initializes the value of a mouse event once it’s been created (normally using the Document.createEvent() method).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
typeArg | string |
canBubbleArg | boolean |
cancelableArg | boolean |
viewArg | 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
Section titled “Returns”void
Deprecated
Section titled “Deprecated”Inherited from
Section titled “Inherited from”MouseEvent.initMouseEventinitUIEvent()
Section titled “initUIEvent()”initUIEvent( typeArg, bubblesArg?, cancelableArg?, viewArg?, detailArg?): void;Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:37301
The UIEvent.initUIEvent() method initializes a UI event once it’s been created.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
typeArg | string |
bubblesArg? | boolean |
cancelableArg? | boolean |
viewArg? | Window | null |
detailArg? | number |
Returns
Section titled “Returns”void
Deprecated
Section titled “Deprecated”Inherited from
Section titled “Inherited from”MouseEvent.initUIEventpreventDefault()
Section titled “preventDefault()”preventDefault(): void;Defined in: node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.dom.d.ts:14258
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.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”MouseEvent.preventDefaultstopImmediatePropagation()
Section titled “stopImmediatePropagation()”stopImmediatePropagation(): void;Defined in: packages/core/src/lyric-player/dom/index.ts:47
The stopImmediatePropagation() method of the Event interface prevents other listeners of the same event from being called.
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”MouseEvent.stopImmediatePropagationstopPropagation()
Section titled “stopPropagation()”stopPropagation(): void;Defined in: packages/core/src/lyric-player/dom/index.ts:42
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().
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”MouseEvent.stopPropagation