search
HomeWeb Front-endFront-end Q&AWhat events does vuejs support?

What events does vuejs support?

Nov 01, 2021 pm 12:12 PM
vuejsevent

Vue supports events: 1. Resource events; 2. Network events; 3. Focus events; 4. WebSocket events; 5. Session history events; 6. CSS animation events; 7. CSS transition events; 8 , form events; 9. Print events; 10. View events; 11. Keyboard events; 12. Mouse events; 13. Drag and drop events, etc.

What events does vuejs support?

The operating environment of this tutorial: windows7 system, vue2.9.6 version, DELL G3 computer.

You can use the v-on directive in vuejs to listen to DOM events and run some JavaScript code when triggered.

Summary of events supported by v-on in vue

Resource events

Event name When to trigger
error When resource loading fails.
abort When loading resources has been aborted.
load The resource and its related resources have been loaded.
beforeunload The window, document and its resources are about to be unloaded.
unload The document or a dependent resource is being unloaded.

Network event

Event name When is triggered
online The browser has gained network access.
offline The browser has lost network access.

Focus event

##Event nameWhen to triggerThe element gets focus (will not bubble). The element loses focus (will not bubble).
focus
blur

WebSocket event

##Event nameopenmessageerrorclose
When to trigger
WebSocket connection established.
A message was received via WebSocket.
The WebSocket connection was closed abnormally (for example, some data could not be sent).
The WebSocket connection has been closed.
Session history event

##Event nameWhen triggered ##pagehidepageshowpopstateCSS animation event
A session history entry is being traversed from.
A session history entry is being traversed to.
A session history entry is being navigated to (in certain cases).

Event nameWhen to triggeranimationstartanimationendanimationiterationCSS transition event
When a CSS animation starts trigger.
Fires when a CSS animation completes.
Triggered when a CSS animation is restarted after completion.

Event nameWhen to trigger ##transitionstartA CSS transition has actually started (fired after any delay).A CSS transition has been canceled.A CSS transition has completed.##transitionrun##A CSS transition has begun running (fired before any delay starts).Form event
transitioncancel
transitionend

Event nameWhen to trigger

When clicking the reset buttonClick the submit buttonPrint event
reset
submit

Time nameWhen to trigger

Trigger when the printer is readyTriggered when the printer is turned off
beforeprint
afterprint
<p><strong>文本写作事件</strong></p> <table> <thead><tr class="firstRow"> <th>Event Name</th> <th>Fired When</th> </tr></thead> <tbody> <tr> <td><code>compositionstart The composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition).
compositionupdate A character is added to a passage of text being composed.
compositionend The composition of a passage of text has been completed or canceled.

视图事件

Event Name Fired When
fullscreenchange An element was turned to fullscreen mode or back to normal mode.
fullscreenerror It was impossible to switch to fullscreen mode for technical reasons or because the permission was denied.
resize The document view has been resized.
scroll The document view or an element has been scrolled.

剪贴板事件

<tr> <td><code>cut
Event Name Fired When
已经剪贴选中的文本内容并且复制到了剪贴板。
copy 已经把选中的文本内容复制到了剪贴板。
paste 从剪贴板复制的文本内容被粘贴。

键盘事件

Event Name Fired When
keydown 按下任意按键。
keypress 除 Shift、Fn、CapsLock 外的任意键被按住。(连续触发。)
keyup 释放任意按键。

鼠标事件

Event Name Fired When
auxclick A pointing device button (ANY non-primary button) has been pressed and released on an element.
click 在元素上按下并释放任意鼠标按键。
contextmenu 右键点击(在右键菜单显示前触发)。
dblclick 在元素上双击鼠标按钮。
mousedown 在元素上按下任意鼠标按钮。
mouseenter 指针移到有事件监听的元素内。
mouseleave 指针移出元素范围外(不冒泡)。
mousemove 指针在元素内移动时持续触发。
mouseover 指针移到有事件监听的元素或者它的子元素内。
mouseout 指针移出元素,或者移到它的子元素上。
mouseup 在元素上释放任意鼠标按键。
pointerlockchange 鼠标被锁定或者解除锁定发生时。
pointerlockerror 可能因为一些技术的原因鼠标锁定被禁止时。
select 有文本被选中。
wheel 滚轮向任意方向滚动。

拖放事件

Event Name Fired When
drag 正在拖动元素或文本选区(在此过程中持续触发,每 350ms 触发一次)
dragend 拖放操作结束。(松开鼠标按钮或按下 Esc 键)
dragenter 被拖动的元素或文本选区移入有效释放目标区
dragstart 用户开始拖动HTML元素或选中的文本
dragleave 被拖动的元素或文本选区移出有效释放目标区
dragover 被拖动的元素或文本选区正在有效释放目标上被拖动 (在此过程中持续触发,每350ms触发一次)
drop 元素在有效释放目标区上释放

媒体事件

Event Name Fired When
audioprocess The input buffer of a ScriptProcessorNode is ready to be processed.
canplay The browser can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
canplaythrough The browser estimates it can play the media up to its end without stopping for content buffering.
complete The rendering of an OfflineAudioContext is terminated.
durationchange The duration attribute has been updated.
emptied The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
ended Playback has stopped because the end of the media was reached.
loadeddata The first frame of the media has finished loading.
loadedmetadata The metadata has been loaded.
pause Playback has been paused.
play Playback has begun.
playing Playback is ready to start after having been paused or delayed due to lack of data.
ratechange The playback rate has changed.
seeked seek operation completed.
seeking seek operation began.
stalled The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
suspend Media data loading has been suspended.
timeupdate The time indicated by the currentTime attribute has been updated.
volumechange The volume has changed.
waiting Playback has stopped because of a temporary lack of data.

进度事件

Event Name Fired When
abort Progression has been terminated (not due to an error).
error Progression has failed.
load Progression has been successful.
loadend Progress has stopped (after "error", "abort" or "load" have been dispatched).
loadstart Progress has begun.
progress In progress.
timeout Progression is terminated due to preset time expiring.

存储事件

  • change (see Non-standard events)

  • storage

更新事件

  • checking

  • downloading

  • error

  • noupdate

  • obsolete

  • updateready

值变化事件

  • broadcast

  • CheckboxStateChange

  • hashchange

  • input

  • RadioStateChange

  • readystatechange

  • ValueChange

未分类的事件

  • invalid

  • message

  • message

  • open

  • show

不常见和非标准事件

Abortable Fetch events

Event name Fired when
abort A DOM request is aborted, i.e. using AbortController.abort().

SVG Event

  • SVGAbort

  • SVGError

  • SVGLoad

  • SVGResize

  • SVGScroll

  • SVGUnload

  • ##SVGZoom

Database Event

  • abort

  • blocked

  • complete

  • ##error

  • success

  • upgradeneeded

  • ##versionchange
  • Script event

##afterscriptexecute
  • beforescriptexecute
  • Menu Event

DOMMenuItemActive
  • DOMMenuItemInactive
  • Window Event

close
  • Popup event

popuphidden
  • popuphiding
  • popupshowing
  • popupshown
  • Tab event

visibilitychange
  • Battery events

chargingchange
  • ##chargingtimechange

  • dischargingtimechange

  • levelchange

  • Call event

alerting

  • ##busy

  • callschanged

  • ##cfstatechange

  • connected

  • connecting

  • dialing

  • disconnected

  • ##disconnecting

  • ##error
  • held
  • ,

    holding

  • ##incoming

    resuming
  • statechange
  • voicechange
  • Sensor events
  • compassneedscalibration

devicemotion
  • deviceorientation
  • ##orientationchange

  • Smart Card Event

  • icccardlockerror

##iccinfochange

  • smartcard-insert

  • ##smartcard-remove

  • stkcommand

  • stksessionend

  • ##cardstatechange

  • SMS and USSD events

  • delivered

  • ##receive

    sen
  • ##ussdreceived
  • Frame events
  • mozbrowserclose
  • mozbrowsercontextmenu

##mozbrowsererror

  • #mozbrowsericonchange

  • mozbrowserlocationchange

  • mozbrowserloadend

  • mozbrowserloadstart

  • mozbrowseropenwindow

  • ##mozbrowsersecuritychange

  • mozbrowsershowmodalprompt

  • mozbrowsertitlechange

  • ##DOM Mutation Event

  • DOMAttributeNameChanged

  • DOMAttrModified

DOMCharacterDataModified

    ##DOMContentLoaded
  • #DOMElementNameChanged
  • DOMNodeInserted
  • DOMNodeInsertedIntoDocument
  • DOMNodeRemoved
  • DOMNodeRemovedFromDocument
  • ##DOMSubtreeModified

  • Touch event

  • ##touchcancel

  • ##touchend

  • touchmove

touchstart

  • Pointer event

  • pointerover

  • ##pointerenter

  • pointerdown

  • ##pointermove

    pointerup
  • pointercancel

  • pointerout

  • pointerleave

  • ##gotpointercapture

  • lostpointercapture

Standard Events

These events are defined in the official web specifications and should be universal across browsers. Each event is listed together with an object that represents the recipient of the event (so you can check the data provided by each event), and the standard or standard link that defines the event.

Repeat a CSS animation A CSS animation has startedA web application is successfully installed as a progressive web app.##AudioProcessingEventScriptProcessorNodeaudioendEventaudiostartEventbeforeprintEventbeforeunloadBeforeUnloadEventbeginEvent TimeEvent##blockedAn open connection to a database is blocking a transaction on the same database.##blurThe spoken utterance reaches a word or sentence boundaryThe user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content. The user agent can play the media up to its end without having to stop for further buffering of content.##change##Event event is fired for , and EventEvent attribute has been updated.MouseEventEventA transaction successfully completed.OfflineAudioCompletionEvent is terminated.##CompositionEventCompositionEventCompositionEventMouseEventThe text selection has been added to the clipboard.
Event name Event type Trigger timing...
abort UIEvent Resource loading has been aborted
abort ProgressEvent Progress was terminated (not caused by error)
abort Event Transaction has been aborted
afterprint Event The related document has started printing or the print preview has been closed
animationcancel AnimationEvent A CSS animation has aborted.
animationend AnimationEvent Complete a CSS animation
##animationiteration AnimationEvent
animationstart AnimationEvent
appinstalled Event
audioprocess The input buffer of a can be processed
User agent captures audio for speech recognition
User agent starts capturing audio for speech recognition
The related document will start printing or prepare for print preview
The window, document and its resources are about to be unloaded
A SMIL animation element begins.
versionchange
FocusEvent An element has lost focus (does not bubble). ##boundary
SpeechSynthesisEvent canplay
Event canplaythrough
Event
The change ,
The battery begins or stops charging . chargingtimechange
The chargingTime click
A pointing device button has been pressed and released on an element. close
A WebSocket connection has been closed. complete
complete
The rendering of an OfflineAudioContext compositionend
The composition of a passage of text has been completed or canceled. compositionstart
The composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition). compositionupdate
A character is added to a passage of text being composed. contextmenu
The right button of the mouse is clicked (before the context menu is displayed). copy ##ClipboardEvent
<tr> <td><code>cut ClipboardEvent  The text selection has been removed from the document and added to the clipboard.
dblclick MouseEvent A pointing device button is clicked twice on an element.
devicechange Event A media device such as a camera, microphone, or speaker is connected or removed from the system.
devicemotion DeviceMotionEvent  Fresh data is available from a motion sensor.
deviceorientation DeviceOrientationEvent  Fresh data is available from an orientation sensor.
dischargingtimechange Event The dischargingTime attribute has been updated.
DOMActivate  UIEvent A button, link or state changing element is activated (use click instead).
DOMAttributeNameChanged  MutationNameEvent The name of an attribute changed (use mutation observers instead).
DOMAttrModified  MutationEvent The value of an attribute has been modified (use mutation observers instead).
DOMCharacterDataModified  MutationEvent A text or another CharacterData has changed (use mutation observers instead).
DOMContentLoaded Event The document has finished loading (but not its dependent resources).
DOMElementNameChanged  MutationNameEvent The name of an element changed (use mutation observers instead).
DOMFocusIn  FocusEvent  An element has received focus (use focus or focusin instead).
DOMFocusOut  FocusEvent  An element has lost focus (use blur or focusout instead).
DOMNodeInserted  MutationEvent A node has been added as a child of another node (use mutation observers instead).
DOMNodeInsertedIntoDocument  MutationEvent A node has been inserted into the document (use mutation observers instead).
DOMNodeRemoved  MutationEvent A node has been removed from its parent node (use mutation observers instead).
DOMNodeRemovedFromDocument  MutationEvent A node has been removed from the document (use mutation observers instead).
DOMSubtreeModified  MutationEvent A change happened in the document (use mutation observers instead).
drag DragEvent An element or text selection is being dragged (every 350ms).
dragend DragEvent A drag operation is being ended (by releasing a mouse button or hitting the escape key).
dragenter DragEvent A dragged element or text selection enters a valid drop target.
dragleave DragEvent A dragged element or text selection leaves a valid drop target.
dragover DragEvent An element or text selection is being dragged over a valid drop target (every 350ms).
dragstart DragEvent The user starts dragging an element or text selection.
drop DragEvent An element is dropped on a valid drop target.
durationchange Event The duration attribute has been updated.
emptied Event The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
end  Event The speech recognition service has disconnected.
end  SpeechSynthesisEvent The utterance has finished being spoken.
ended Event Playback has stopped because the end of the media was reached.
ended Event Playback has stopped because the end of the media was reached.
endEvent TimeEvent A SMIL animation element ends.
error UIEvent A resource failed to load.
error ProgressEvent Progression has failed.
error Event A WebSocket connection has been closed with prejudice (some data couldn't be sent for example).
error Event An event source connection has been failed.
error Event A request caused an error and failed.
error  Event A speech recognition error occurs.
error SpeechSynthesisErrorEvent An error occurs that prevents the utterance from being successfully spoken.
focus FocusEvent  An element has received focus (does not bubble).
focusin FocusEvent  An element is about to receive focus (bubbles).
focusout FocusEvent  An element is about to lose focus (bubbles).
fullscreenchange Event An element was turned to fullscreen mode or back to normal mode.
fullscreenerror Event It was impossible to switch to fullscreen mode for technical reasons or because the permission was denied.
gamepadconnected GamepadEvent  A gamepad has been connected.
gamepaddisconnected GamepadEvent  A gamepad has been disconnected.
gotpointercapture PointerEvent Element receives pointer capture.
hashchange HashChangeEvent The fragment identifier of the URL has changed (the part of the URL after the #).
lostpointercapture PointerEvent Element lost pointer capture.
input Event The value of an element changes or the content of an element with the attribute contenteditable is modified.
invalid Event A submittable element has been checked and doesn't satisfy its constraints.
keydown KeyboardEvent A key is pressed down.
keypress KeyboardEvent A key is pressed down and that key normally produces a character value (use input instead).
keyup KeyboardEvent A key is released.
languagechange  Event The user's preferred languages have changed.
levelchange Event The level attribute has been updated.
load UIEvent A resource and its dependent resources have finished loading.
load ProgressEvent Progression has been successful.
loadeddata Event The first frame of the media has finished loading.
loadedmetadata Event The metadata has been loaded.
loadend ProgressEvent Progress has stopped (after "error", "abort" or "load" have been dispatched).
loadstart ProgressEvent Progress has begun.
mark  SpeechSynthesisEvent The spoken utterance reaches a named SSML "mark" tag.
message MessageEvent A message is received through a WebSocket.
message MessageEvent A message is received from a Web Worker.
message MessageEvent A message is received from a child (i)frame or a parent window.
message MessageEvent A message is received through an event source.
messageerror MessageEvent A message error is raised when a message is received by an object.
message  ServiceWorkerMessageEvent or ExtendableMessageEvent, depending on context. A message is received from a service worker, or a message is received in a service worker from another context.
mousedown MouseEvent A pointing device button (usually a mouse) is pressed on an element.
mouseenter MouseEvent A pointing device is moved onto the element that has the listener attached.
mouseleave MouseEvent A pointing device is moved off the element that has the listener attached.
mousemove MouseEvent A pointing device is moved over an element.
mouseout MouseEvent A pointing device is moved off the element that has the listener attached or off one of its children.
mouseover MouseEvent A pointing device is moved onto the element that has the listener attached or onto one of its children.
mouseup MouseEvent A pointing device button is released over an element.
nomatch  SpeechRecognitionEvent The speech recognition service returns a final result with no significant recognition.
notificationclick NotificationEvent  A system notification spawned by ServiceWorkerRegistration.showNotification() has been clicked.
offline Event The browser has lost access to the network.
online Event The browser has gained access to the network (but particular websites might be unreachable).
open Event A WebSocket connection has been established.
open Event An event source connection has been established.
orientationchange Event The orientation of the device (portrait/landscape) has changed
pagehide PageTransitionEvent A session history entry is being traversed from.
pageshow PageTransitionEvent A session history entry is being traversed to.
paste ClipboardEvent  Data has been transferred from the system clipboard to the document.
pause Event Playback has been paused.
pause  SpeechSynthesisEvent The utterance is paused part way through.
pointercancel PointerEvent The pointer is unlikely to produce any more events.
pointerdown PointerEvent The pointer enters the active buttons state.
pointerenter PointerEvent Pointing device is moved inside the hit-testing boundary.
pointerleave PointerEvent Pointing device is moved out of the hit-testing boundary.
pointerlockchange Event The pointer was locked or released.
pointerlockerror Event It was impossible to lock the pointer for technical reasons or because the permission was denied.
pointermove PointerEvent The pointer changed coordinates.
pointerout PointerEvent The pointing device moved out of hit-testing boundary or leaves detectable hover range.
pointerover PointerEvent The pointing device is moved into the hit-testing boundary.
pointerup PointerEvent The pointer leaves the active buttons state.
play Event Playback has begun.
playing Event Playback is ready to start after having been paused or delayed due to lack of data.
popstate PopStateEvent A session history entry is being navigated to (in certain cases).
progress ProgressEvent In progress.
push PushEvent  A Service Worker has received a push message.
pushsubscriptionchange PushEvent  A PushSubscription has expired.
ratechange Event The playback rate has changed.
readystatechange Event The readyState attribute of a document has changed.
repeatEvent TimeEvent A SMIL animation element is repeated.
reset Event A form is reset.
resize UIEvent The document view has been resized.
resourcetimingbufferfull Performance The browser's resource timing buffer is full.
result  SpeechRecognitionEvent  The speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app.
resume  SpeechSynthesisEvent  A paused utterance is resumed.
scroll UIEvent The document view or an element has been scrolled.
seeked Event seek operation completed.
seeking Event seek operation began.
select UIEvent Some text is being selected.
selectstart  Event A selection just started.
selectionchange  Event The selection in the document has been changed.
show MouseEvent A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute
slotchange Event The node contents of a HTMLSlotElement (<slot></slot>) have changed.
soundend  Event Any sound — recognisable speech or not — has stopped being detected.
soundstart  Event Any sound — recognisable speech or not — has been detected.
speechend  Event Speech recognised by the speech recognition service has stopped being detected.
speechstart  Event Sound that is recognised by the speech recognition service as speech has been detected.
stalled Event The user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
start  Event The speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition.
start SpeechSynthesisEvent The utterance has begun to be spoken.
storage StorageEvent A storage area (localStorage or sessionStorage) has changed.
submit Event A form is submitted.
success Event A request successfully completed.
suspend Event Media data loading has been suspended.
SVGAbort SVGEvent Page loading has been stopped before the SVG was loaded.
SVGError SVGEvent An error has occurred before the SVG was loaded.
SVGLoad SVGEvent An SVG document has been loaded and parsed.
SVGResize SVGEvent An SVG document is being resized.
SVGScroll SVGEvent An SVG document is being scrolled.
SVGUnload SVGEvent An SVG document has been removed from a window or frame.
SVGZoom SVGZoomEvent An SVG document is being zoomed.
timeout ProgressEvent  
timeupdate Event The time indicated by the currentTime attribute has been updated.
touchcancel TouchEvent A touch point has been disrupted in an implementation-specific manners (too many touch points for example).
touchend TouchEvent A touch point is removed from the touch surface.
touchmove TouchEvent A touch point is moved along the touch surface.
touchstart TouchEvent A touch point is placed on the touch surface.
transitionend TransitionEvent  A CSS transition has completed.
unload UIEvent The document or a dependent resource is being unloaded.
upgradeneeded   An attempt was made to open a database with a version number higher than its current version. A versionchange transaction has been created.
userproximity UserProximityEvent  Fresh data is available from a proximity sensor (indicates whether the nearby object is near the device or not).
voiceschanged  Event The list of SpeechSynthesisVoice objects that would be returned by the SpeechSynthesis.getVoices() method has changed (when the voiceschanged event fires.)
versionchange   versionchange transaction completed.
visibilitychange Event The content of a tab has become visible or has been hidden.
volumechange Event The volume has changed.
waiting Event Playback has stopped because of a temporary lack of data.
wheel WheelEvent A wheel button of a pointing device is rotated in any direction.

非标准事件

Event Name Event Type Fired when...
afterscriptexecute Event A script has been executed.
beforescriptexecute Event A script is about to be executed.
beforeinstallprompt Event A user is prompted to save a web site to a home screen on mobile.
cardstatechange   The MozMobileConnection.cardState property changes value.
change DeviceStorageChangeEvent This event is triggered each time a file is created, modified or deleted on a given storage area.
connectionInfoUpdate   The informations about the signal strength and the link speed have been updated.
cfstatechange   The call forwarding state changes.
datachange   The MozMobileConnection.data object changes values.
dataerror   The MozMobileConnection.data object receive an error from the RIL.
DOMMouseScroll   The wheel button of a pointing device is rotated (detail attribute is a number of lines). (use wheel instead)
dragdrop  DragEvent An element is dropped (use drop instead).
dragexit  DragEvent A drag operation is being ended(use dragend instead).
draggesture  DragEvent The user starts dragging an element or text selection (use dragstart instead).
icccardlockerror   the MozMobileConnection.unlockCardLock() or MozMobileConnection.setCardLock() methods fails.
iccinfochange   The MozMobileConnection.iccInfo object changes.
localized   The page has been localized using data-l10n-* attributes.
mousewheel    The wheel button of a pointing device is rotated.
MozAudioAvailable Event The audio buffer is full and the corresponding raw samples are available.
MozBeforeResize    A window is about to be resized.
mozbrowseractivitydone   Sent when some activity has been completed (complete description TBD.)
mozbrowserasyncscroll   Sent when the scroll position within a browser <iframe></iframe> changes.
mozbrowseraudioplaybackchange   Sent when audio starts or stops playing within the browser <iframe></iframe> content.
mozbrowsercaretstatechanged   Sent when the text selected inside the browser <iframe></iframe> content changes.
mozbrowserclose   Sent when window.close() is called within a browser <iframe></iframe>.
mozbrowsercontextmenu   Sent when a browser <iframe></iframe> try to open a context menu.
mozbrowserdocumentfirstpaint   Sent when a new paint occurs on any document in the browser <iframe></iframe>.
mozbrowsererror   Sent when an error occured while trying to load a content within a browser iframe
mozbrowserfindchange   Sent when a search operation is performed on the browser <iframe></iframe> content (see HTMLIFrameElement search methods.)
mozbrowserfirstpaint   Sent when the <iframe></iframe> paints content for the first time (this doesn't include the initial paint from about:blank.)
mozbrowsericonchange   Sent when the favicon of a browser iframe changes.
mozbrowserlocationchange   Sent when an browser iframe's location changes.
mozbrowserloadend   Sent when the browser iframe has finished loading all its assets.
mozbrowserloadstart   Sent when the browser iframe starts to load a new page.
mozbrowsermanifestchange   Sent when a the path to the app manifest changes, in the case of a browser <iframe></iframe> with an open web app embedded in it.
mozbrowsermetachange   Sent when a <meta> elelment is added to, removed from or changed in the browser <iframe></iframe>'s content.
mozbrowseropensearch   Sent when a link to a search engine is found.
mozbrowseropentab   Sent when a new tab is opened within a browser <iframe></iframe> as a result of the user issuing a command to open a link target in a new tab (for example ctrl/cmd  click.)
mozbrowseropenwindow   Sent when window.open() is called within a browser iframe.
mozbrowserresize   Sent when the browser <iframe></iframe>'s window size has changed.
mozbrowserscroll   Sent when the browser <iframe></iframe> content scrolls.
mozbrowserscrollareachanged   Sent when the available scrolling area in the browser <iframe></iframe> changes. This can occur on resize and when the page size changes (while loading for example.)
mozbrowserscrollviewchange   Sent when asynchronous scrolling (i.e. APCZ) starts or stops.
mozbrowsersecuritychange   Sent when the SSL state changes within a browser iframe.
mozbrowserselectionstatechanged   Sent when the text selected inside the browser <iframe></iframe> content changes. Note that this is deprecated, and newer implementations use mozbrowsercaretstatechanged instead.
mozbrowsershowmodalprompt   Sent when alert()confirm() or prompt() are called within a browser iframe
mozbrowsertitlechange   Sent when the document.title changes within a browser iframe.
mozbrowserusernameandpasswordrequired   Sent when an HTTP authentification is requested.
mozbrowservisibilitychange   Sent when the visibility state of the current browser iframe <iframe></iframe> changes, for example due to a call to setVisible().
MozGamepadButtonDown   A gamepad button is pressed down.
MozGamepadButtonUp   A gamepad button is released.
MozMousePixelScroll    The wheel button of a pointing device is rotated (detail attribute is a number of pixels). (use wheel instead)
MozOrientation    Fresh data is available from an orientation sensor (see deviceorientation).
MozScrolledAreaChanged UIEvent The document view has been scrolled or resized.
moztimechange   The time of the device has been changed.
MozTouchDown    A touch point is placed on the touch surface (use touchstart instead).
MozTouchMove    A touch point is moved along the touch surface (use touchmove instead).
MozTouchUp    A touch point is removed from the touch surface (use touchend instead).
alerting CallEvent The correspondent is being alerted (his/her phone is ringing).
busy CallEvent The line of the correspondent is busy.
callschanged CallEvent A call has been added or removed from the list of current calls.
onconnected connected CallEvent A call has been connected.
connecting CallEvent A call is about to connect.
delivered SMSEvent An SMS has been successfully delivered.
dialing CallEvent The number of a correspondent has been dialed.
disabled   Wifi has been disabled on the device.
disconnected CallEvent A call has been disconnected.
disconnecting CallEvent A call is about to disconnect.
enabled   Wifi has been enabled on the device.
error CallEvent An error occurred.
held CallEvent A call has been held.
holding CallEvent A call is about to be held.
incoming CallEvent A call is being received.
received SMSEvent An SMS has been received.
resuming CallEvent A call is about to resume.
sent SMSEvent An SMS has been sent.
statechange CallEvent The state of a call has changed.
statuschange   The status of the Wifi connection changed.
overflow UIEvent An element has been overflowed by its content or has been rendered for the first time in this state (only works for elements styled with overflow != visible).
smartcard-insert   A smartcard has been inserted.
smartcard-remove   A smartcard has been removed.
stkcommand   The STK Proactive Command is issued from ICC.
stksessionend   The STK Session is terminated by ICC.
touchenter TouchEvent  
touchleave TouchEvent  
underflow UIEvent An element is no longer overflowed by its content (only works for elements styled with overflow != visible).
uploadprogress  ProgressEvent Upload is in progress (see progress).

ussdreceived

  A new USSD message is received
voicechange   The MozMobileConnection.voice object changes values.
msContentZoom    
MSManipulationStateChanged    
MSPointerHover     

Mozilla Specific Events

Note: These events are not exposed for use by web content and can only be used in the context of chrome content.

XUL Event

##Event NameEvent TypeSpecificationFired when.. .##broadcastobserver CheckboxStateChangecheckboxclose##commandXULAn element has been activated.commandupdateXULA command update occurred on a element.##DOMMenuItemActiveDOMMenuItemInactiveXULpopuphiddenpopuphiding popupshowingpopupshowRadioStateChangeradioValueChange
XUL An noticed a change to the attributes of a watched broadcaster.
XUL The state of a has been changed either by a user action or by a script (useful for accessibility).
XUL The close button of the window has been clicked.
commandset
XUL A menu or menuitem has been hovered or highlighted.
A menu or menuitem is no longer hovered or highlighted.
PopupEvent XUL A menupopup, panel or tooltip has been hidden.
PopupEvent XUL A menupopup, panel or tooltip is about to be hidden.
PopupEvent XUL A menupopup , panel or tooltip is about to become visible.
PopupEvent XUL A menupopup, panel or tooltip has become visible.
XUL The state of a has been changed either by a user action or by a script (useful for accessibility).
XUL The value of an element has changed (a progress bar for example, useful for accessibility).

附加组件特定事件

Event Name Event Type Specification Fired when...
MozSwipeGesture   Addons specific A touch point is swiped across the touch surface
MozMagnifyGestureStart   Addons specific Two touch points start to move away from each other.
MozMagnifyGestureUpdate   Addons specific Two touch points move away from each other (after a MozMagnifyGestureStart).
MozMagnifyGesture   Addons specific Two touch points moved away from each other (after a sequence of MozMagnifyGestureUpdate).
MozRotateGestureStart   Addons specific Two touch points start to rotate around a point.
MozRotateGestureUpdate   Addons specific Two touch points rotate around a point (after a MozRotateGestureStart).
MozRotateGesture   Addons specific Two touch points rotate around a point (after a sequence of MozRotateGestureUpdate).
MozTapGesture   Addons specific Two touch points are tapped on the touch surface.
MozPressTapGesture   Addons specific A "press-tap" gesture happened on the touch surface (first finger down, second finger down, second finger up, first finger up).
MozEdgeUIGesture   Addons specific A touch point is swiped across the touch surface to invoke the edge UI (Win8 only).
MozAfterPaint   Addons specific Content has been repainted.
DOMPopupBlocked   Addons specific A popup has been blocked
DOMWindowCreated   Addons specific A window has been created.
DOMWindowClose   Addons specific A window is about to be closed.
DOMTitleChanged   Addons specifc The title of a window has changed.
DOMLinkAdded   Addons specifc A link has been added a document.
DOMLinkRemoved   Addons specifc A link has been removed inside from a document.
DOMMetaAdded   Addons specific meta element has been added to a document.
DOMMetaRemoved   Addons specific meta element has been removed from a document.
DOMWillOpenModalDialog   Addons specific A modal dialog is about to open.
DOMModalDialogClosed   Addons specific A modal dialog has been closed.
DOMAutoComplete   Addons specific The content of an element has been auto-completed.
DOMFrameContentLoaded   Addons specific The frame has finished loading (but not its dependent resources).
AlertActive   Addons specific notification element is shown.
AlertClose   Addons specific notification element is closed.
fullscreen   Addons specific Browser fullscreen mode has been entered or left.
sizemodechange   Addons specific Window has entered/left fullscreen mode, or has been minimized/unminimized.
MozEnteredDomFullscreen   Addons specific DOM fullscreen mode has been entered.
SSWindowClosing   Addons specific The session store will stop tracking this window.
SSTabClosing   Addons specific The session store will stop tracking this tab.
SSTabRestoring   Addons specific A tab is about to be restored.
SSTabRestored   Addons specific A tab has been restored.
SSWindowStateReady   Addons specific A window state has switched to "ready".
SSWindowStateBusy   Addons specific A window state has switched to "busy".
TabOpen   Addons specific A tab has been opened.
TabClose   Addons specific A tab has been closed.
TabSelect   Addons specific A tab has been selected.
TabShow   Addons specific A tab has been shown.
TabHide   Addons specific A tab has been hidden.
TabPinned   Addons specific A tab has been pinned.
TabUnpinned   Addons specific A tab has been unpinned.

开发者工具特定事件

Event Name Event Type Specification Fired when...
CssRuleViewRefreshed   devtools specific The "Rules" view of the style inspector has been updated.
CssRuleViewChanged   devtools specific The "Rules" view of the style inspector has been changed.
CssRuleViewCSSLinkClicked   devtools specific A link to a CSS file has been clicked in the "Rules" view of the style inspector.

每一个不曾起舞的日子,都是对生命的辜负。 温柔正确的人总是难以生存,因为这世界既不温柔,也不正确。 教育就是当一个人把在学校所学全部忘光之后剩下的东西。 当你凝视深渊时,深渊也在凝视着你。

相关推荐:《vue.js教程

The above is the detailed content of What events does vuejs support?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
HTML and React's Integration: A Practical GuideHTML and React's Integration: A Practical GuideApr 21, 2025 am 12:16 AM

HTML and React can be seamlessly integrated through JSX to build an efficient user interface. 1) Embed HTML elements using JSX, 2) Optimize rendering performance using virtual DOM, 3) Manage and render HTML structures through componentization. This integration method is not only intuitive, but also improves application performance.

React and HTML: Rendering Data and Handling EventsReact and HTML: Rendering Data and Handling EventsApr 20, 2025 am 12:21 AM

React efficiently renders data through state and props, and handles user events through the synthesis event system. 1) Use useState to manage state, such as the counter example. 2) Event processing is implemented by adding functions in JSX, such as button clicks. 3) The key attribute is required to render the list, such as the TodoList component. 4) For form processing, useState and e.preventDefault(), such as Form components.

The Backend Connection: How React Interacts with ServersThe Backend Connection: How React Interacts with ServersApr 20, 2025 am 12:19 AM

React interacts with the server through HTTP requests to obtain, send, update and delete data. 1) User operation triggers events, 2) Initiate HTTP requests, 3) Process server responses, 4) Update component status and re-render.

React: Focusing on the User Interface (Frontend)React: Focusing on the User Interface (Frontend)Apr 20, 2025 am 12:18 AM

React is a JavaScript library for building user interfaces that improves efficiency through component development and virtual DOM. 1. Components and JSX: Use JSX syntax to define components to enhance code intuitiveness and quality. 2. Virtual DOM and Rendering: Optimize rendering performance through virtual DOM and diff algorithms. 3. State management and Hooks: Hooks such as useState and useEffect simplify state management and side effects handling. 4. Example of usage: From basic forms to advanced global state management, use the ContextAPI. 5. Common errors and debugging: Avoid improper state management and component update problems, and use ReactDevTools to debug. 6. Performance optimization and optimality

React's Role: Frontend or Backend? Clarifying the DistinctionReact's Role: Frontend or Backend? Clarifying the DistinctionApr 20, 2025 am 12:15 AM

Reactisafrontendlibrary,focusedonbuildinguserinterfaces.ItmanagesUIstateandupdatesefficientlyusingavirtualDOM,andinteractswithbackendservicesviaAPIsfordatahandling,butdoesnotprocessorstoredataitself.

React in the HTML: Building Interactive User InterfacesReact in the HTML: Building Interactive User InterfacesApr 20, 2025 am 12:05 AM

React can be embedded in HTML to enhance or completely rewrite traditional HTML pages. 1) The basic steps to using React include adding a root div in HTML and rendering the React component via ReactDOM.render(). 2) More advanced applications include using useState to manage state and implement complex UI interactions such as counters and to-do lists. 3) Optimization and best practices include code segmentation, lazy loading and using React.memo and useMemo to improve performance. Through these methods, developers can leverage the power of React to build dynamic and responsive user interfaces.

React: The Foundation for Modern Frontend DevelopmentReact: The Foundation for Modern Frontend DevelopmentApr 19, 2025 am 12:23 AM

React is a JavaScript library for building modern front-end applications. 1. It uses componentized and virtual DOM to optimize performance. 2. Components use JSX to define, state and attributes to manage data. 3. Hooks simplify life cycle management. 4. Use ContextAPI to manage global status. 5. Common errors require debugging status updates and life cycles. 6. Optimization techniques include Memoization, code splitting and virtual scrolling.

The Future of React: Trends and Innovations in Web DevelopmentThe Future of React: Trends and Innovations in Web DevelopmentApr 19, 2025 am 12:22 AM

React's future will focus on the ultimate in component development, performance optimization and deep integration with other technology stacks. 1) React will further simplify the creation and management of components and promote the ultimate in component development. 2) Performance optimization will become the focus, especially in large applications. 3) React will be deeply integrated with technologies such as GraphQL and TypeScript to improve the development experience.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor