vuejs支持哪些事件

2021-11-01 13:49:48 IT技术网 互联网
浏览

vue支持的事件:1、资源事件;2、网络事件;3、焦点事件;4、WebSocket事件;5、会话历史事件;6、CSS动画事件;7、CSS过渡事件;8、表单事件;9、打印事件;10、视图事件;11、键盘事件;12、鼠标事件;13、拖放事件等。

本教程操作环境:windows7系统、vue2.9.6版,DELL G3电脑。

vuejs中可以用 v-on 指令监听 DOM 事件,并在触发时运行一些 JavaScript 代码。

vue中v-on支持的事件总结

资源事件

事件名称何时触发
error资源加载失败时。
abort正在加载资源已经被中止时。
load资源及其相关资源已完成加载。
beforeunloadwindow,document 及其资源即将被卸载。
unload文档或一个依赖资源正在被卸载。

网络事件

事件名称何时触发
online浏览器已获得网络访问。
offline浏览器已失去网络访问。

焦点事件

事件名称何时触发
focus元素获得焦点(不会冒泡)。
blur元素失去焦点(不会冒泡)。

WebSocket 事件

事件名称何时触发
openWebSocket 连接已建立。
message通过 WebSocket 接收到一条消息。
errorWebSocket 连接异常被关闭(比如有些数据无法发送)。
closeWebSocket 连接已关闭。

会话历史事件

事件名称何时触发
pagehideA session history entry is being traversed from.
pageshowA session history entry is being traversed to.
popstateA session history entry is being navigated to (in certain cases).

CSS 动画事件

事件名称何时触发
animationstart某个 CSS 动画开始时触发。
animationend某个 CSS 动画完成时触发。
animationiteration某个 CSS 动画完成后重新开始时触发。

CSS 过渡事件

事件名称何时触发
transitionstartA CSS transition has actually started (fired after any delay).
transitioncancelA CSS transition has been cancelled.
transitionendA CSS transition has completed.
transitionrunA CSS transition has begun running (fired before any delay starts).

表单事件

事件名称何时触发
reset点击重置按钮时
submit点击提交按钮

打印事件

时间名称何时触发
beforeprint打印机已经就绪时触发
afterprint打印机关闭时触发

文本写作事件

Event NameFired When
compositionstartThe composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition).
compositionupdateA character is added to a passage of text being composed.
compositionendThe composition of a passage of text has been completed or canceled.

视图事件

Event NameFired When
fullscreenchangeAn element was turned to fullscreen mode or back to normal mode.
fullscreenerrorIt was impossible to switch to fullscreen mode for technical reasons or because the permission was denied.
resizeThe document view has been resized.
scrollThe document view or an element has been scrolled.

剪贴板事件

Event NameFired When
cut已经剪贴选中的文本内容并且复制到了剪贴板。
copy已经把选中的文本内容复制到了剪贴板。
paste从剪贴板复制的文本内容被粘贴。

键盘事件

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

鼠标事件

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

媒体事件

Event NameFired When
audioprocessThe input buffer of a ScriptProcessorNode is ready to be processed.
canplayThe 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.
canplaythroughThe browser estimates it can play the media up to its end without stopping for content buffering.
completeThe rendering of an OfflineAudioContext is terminated.
durationchangeThe duration attribute has been updated.
emptiedThe 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.
endedPlayback has stopped because the end of the media was reached.
loadeddataThe first frame of the media has finished loading.
loadedmetadataThe metadata has been loaded.
pausePlayback has been paused.
playPlayback has begun.
playingPlayback is ready to start after having been paused or delayed due to lack of data.
ratechangeThe playback rate has changed.
seekedA seek operation completed.
seekingA seek operation began.
stalledThe user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
suspendMedia data loading has been suspended.
timeupdateThe time indicated by the currentTime attribute has been updated.
volumechangeThe volume has changed.
waitingPlayback has stopped because of a temporary lack of data.

进度事件

Event NameFired When
abortProgression has been terminated (not due to an error).
errorProgression has failed.
loadProgression has been successful.
loadendProgress has stopped (after "error", "abort" or "load" have been dispatched).
loadstartProgress has begun.
progressIn progress.
timeoutProgression 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 nameFired when
abortA DOM request is aborted, i.e. using AbortController.abort().

SVG 事件

  • SVGAbort

  • SVGError

  • SVGLoad

  • SVGResize

  • SVGScroll

  • SVGUnload

  • SVGZoom

数据库事件

  • abort

  • blocked

  • complete

  • error

  • success

  • upgradeneeded

  • versionchange

脚本事件

  • afterscriptexecute

  • beforescriptexecute

菜单事件

  • DOMMenuItemActive

  • DOMMenuItemInactive

窗口事件

  • close

弹出事件

  • popuphidden

  • popuphiding

  • popupshowing

  • popupshown

Tab 事件

  • visibilitychange

电池事件

  • chargingchange

  • chargingtimechange

  • dischargingtimechange

  • levelchange

呼叫事件

  • alerting

  • busy

  • callschanged

  • cfstatechange

  • connected

  • connecting

  • dialing

  • disconnected

  • disconnecting

  • error

  • held, holding

  • incoming

  • resuming

  • statechange

  • voicechange

传感器事件

  • compassneedscalibration

  • devicemotion

  • deviceorientation

  • orientationchange

智能卡事件

  • icccardlockerror

  • iccinfochange

  • smartcard-insert

  • smartcard-remove

  • stkcommand

  • stksessionend

  • cardstatechange

短信和USSD事件

  • delivered

  • receive

  • sen

  • ussdreceived

帧事件

  • mozbrowserclose

  • mozbrowsercontextmenu

  • mozbrowsererror

  • mozbrowsericonchange

  • mozbrowserlocationchange

  • mozbrowserloadend

  • mozbrowserloadstart

  • mozbrowseropenwindow

  • mozbrowsersecuritychange

  • mozbrowsershowmodalprompt

  • mozbrowsertitlechange

DOM变异事件

  • DOMAttributeNameChanged

  • DOMAttrModified

  • DOMCharacterDataModified

  • DOMContentLoaded

  • DOMElementNameChanged

  • DOMNodeInserted

  • DOMNodeInsertedIntoDocument

  • DOMNodeRemoved

  • DOMNodeRemovedFromDocument

  • DOMSubtreeModified

触摸事件

  • touchcancel

  • touchend

  • touchmove

  • touchstart

指针事件

  • pointerover

  • pointerenter

  • pointerdown

  • pointermove

  • pointerup

  • pointercancel

  • pointerout

  • pointerleave

  • gotpointercapture

  • lostpointercapture

标准事件

这些事件在官方Web规范中定义,并且应在各个浏览器中通用。 每个事件都和代表事件接收方的对象(由此您可以查到每个事件提供的数据),定义这个事件的标准或标准链接会一起列出。

事件名称事件类型触发时机...
abortUIEvent资源载入已被中止
abortProgressEventProgress被终止(不是error造成的)
abortEvent事务已被中止
afterprintEvent相关文档已开始打印或打印预览已被关闭
animationcancelAnimationEvent A CSS animation has aborted.
animationendAnimationEvent 完成一个CSS 动画
animationiterationAnimationEvent 重复播放一个CSS 动画
animationstartAnimationEvent 一个 CSS 动画已开始
appinstalledEventA web application is successfully installed as a progressive web app.
audioprocessAudioProcessingEvent 一个ScriptProcessorNode 的输入缓冲区可处理
audioend Event用户代理捕捉到用以语音识别的音频
audiostart Event用户代理开始捕捉用以语音识别的音频
beforeprintEvent相关文档将要开始打印或准备打印预览
beforeunloadBeforeUnloadEvent即将卸载 window,document 及其资源
beginEventTimeEventA SMIL animation element begins.
blocked An open connection to a database is blocking a versionchange transaction on the same database.
blurFocusEvent An element has lost focus (does not bubble).
boundary SpeechSynthesisEventThe spoken utterance reaches a word or sentence boundary
canplayEventThe 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.
canplaythroughEventThe user agent can play the media up to its end without having to stop for further buffering of content.
changeEventThe change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user.
chargingchangeEventThe battery begins or stops charging.
chargingtimechangeEventThe chargingTime attribute has been updated.
clickMouseEventA pointing device button has been pressed and released on an element.
closeEventA WebSocket connection has been closed.
complete A transaction successfully completed.
completeOfflineAudioCompletionEvent The rendering of an OfflineAudioContext is terminated.
compositionendCompositionEventThe composition of a passage of text has been completed or canceled.
compositionstartCompositionEventThe composition of a passage of text is prepared (similar to keydown for a keyboard input, but works with other inputs such as speech recognition).
compositionupdateCompositionEventA character is added to a passage of text being composed.
contextmenuMouseEventThe right button of the mouse is clicked (before the context menu is displayed).
copyClipboardEvent The text selection has been added to the clipboard.
cutClipboardEvent The text selection has been removed from the document and added to the clipboard.
dblclickMouseEventA pointing device button is clicked twice on an element.
devicechangeEventA media device such as a camera, microphone, or speaker is connected or removed from the system.
devicemotionDeviceMotionEvent Fresh data is available from a motion sensor.
deviceorientationDeviceOrientationEvent Fresh data is available from an orientation sensor.
dischargingtimechangeEventThe dischargingTime attribute has been updated.
DOMActivate UIEventA button, link or state changing element is activated (use click instead).
DOMAttributeNameChanged MutationNameEventThe name of an attribute changed (use mutation observers instead).
DOMAttrModified MutationEventThe value of an attribute has been modified (use mutation observers instead).
DOMCharacterDataModified MutationEventA text or another CharacterData has changed (use mutation observers instead).
DOMContentLoadedEventThe document has finished loading (but not its dependent resources).
DOMElementNameChanged MutationNameEventThe 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 MutationEventA node has been added as a child of another node (use mutation observers instead).
DOMNodeInsertedIntoDocument MutationEventA node has been inserted into the document (use mutation observers instead).
DOMNodeRemoved MutationEventA node has been removed from its parent node (use mutation observers instead).
DOMNodeRemovedFromDocument MutationEventA node has been removed from the document (use mutation observers instead).
DOMSubtreeModified MutationEventA change happened in the document (use mutation observers instead).
dragDragEventAn element or text selection is being dragged (every 350ms).
dragendDragEventA drag operation is being ended (by releasing a mouse button or hitting the escape key).
dragenterDragEventA dragged element or text selection enters a valid drop target.
dragleaveDragEventA dragged element or text selection leaves a valid drop target.
dragoverDragEventAn element or text selection is being dragged over a valid drop target (every 350ms).
dragstartDragEventThe user starts dragging an element or text selection.
dropDragEventAn element is dropped on a valid drop target.
durationchangeEventThe duration attribute has been updated.
emptiedEventThe 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 EventThe speech recognition service has disconnected.
end SpeechSynthesisEventThe utterance has finished being spoken.
endedEventPlayback has stopped because the end of the media was reached.
endedEventPlayback has stopped because the end of the media was reached.
endEventTimeEventA SMIL animation element ends.
errorUIEventA resource failed to load.
errorProgressEventProgression has failed.
errorEventA WebSocket connection has been closed with prejudice (some data couldn't be sent for example).
errorEventAn event source connection has been failed.
errorEventA request caused an error and failed.
error EventA speech recognition error occurs.
errorSpeechSynthesisErrorEventAn error occurs that prevents the utterance from being successfully spoken.
focusFocusEvent An element has received focus (does not bubble).
focusinFocusEvent An element is about to receive focus (bubbles).
focusoutFocusEvent An element is about to lose focus (bubbles).
fullscreenchangeEventAn element was turned to fullscreen mode or back to normal mode.
fullscreenerrorEventIt was impossible to switch to fullscreen mode for technical reasons or because the permission was denied.
gamepadconnectedGamepadEvent A gamepad has been connected.
gamepaddisconnectedGamepadEvent A gamepad has been disconnected.
gotpointercapturePointerEventElement receives pointer capture.
hashchangeHashChangeEventThe fragment identifier of the URL has changed (the part of the URL after the #).
lostpointercapturePointerEventElement lost pointer capture.
inputEventThe value of an element changes or the content of an element with the attribute contenteditable is modified.
invalidEventA submittable element has been checked and doesn't satisfy its constraints.
keydownKeyboardEventA key is pressed down.
keypressKeyboardEventA key is pressed down and that key normally produces a character value (use input instead).
keyupKeyboardEventA key is released.
languagechange EventThe user's preferred languages have changed.
levelchangeEventThe level attribute has been updated.
loadUIEventA resource and its dependent resources have finished loading.
loadProgressEventProgression has been successful.
loadeddataEventThe first frame of the media has finished loading.
loadedmetadataEventThe metadata has been loaded.
loadendProgressEventProgress has stopped (after "error", "abort" or "load" have been dispatched).
loadstartProgressEventProgress has begun.
mark SpeechSynthesisEventThe spoken utterance reaches a named SSML "mark" tag.
messageMessageEventA message is received through a WebSocket.
messageMessageEventA message is received from a Web Worker.
messageMessageEventA message is received from a child (i)frame or a parent window.
messageMessageEventA message is received through an event source.
messageerrorMessageEventA 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.
mousedownMouseEventA pointing device button (usually a mouse) is pressed on an element.
mouseenterMouseEventA pointing device is moved onto the element that has the listener attached.
mouseleaveMouseEventA pointing device is moved off the element that has the listener attached.
mousemoveMouseEventA pointing device is moved over an element.
mouseoutMouseEventA pointing device is moved off the element that has the listener attached or off one of its children.
mouseoverMouseEventA pointing device is moved onto the element that has the listener attached or onto one of its children.
mouseupMouseEventA pointing device button is released over an element.
nomatch SpeechRecognitionEventThe speech recognition service returns a final result with no significant recognition.
notificationclickNotificationEvent A system notification spawned by ServiceWorkerRegistration.showNotification() has been clicked.
offlineEventThe browser has lost access to the network.
onlineEventThe browser has gained access to the network (but particular websites might be unreachable).
openEventA WebSocket connection has been established.
openEventAn event source connection has been established.
orientationchangeEventThe orientation of the device (portrait/landscape) has changed
pagehidePageTransitionEventA session history entry is being traversed from.
pageshowPageTransitionEventA session history entry is being traversed to.
pasteClipboardEvent Data has been transferred from the system clipboard to the document.
pauseEventPlayback has been paused.
pause SpeechSynthesisEventThe utterance is paused part way through.
pointercancelPointerEventThe pointer is unlikely to produce any more events.
pointerdownPointerEventThe pointer enters the active buttons state.
pointerenterPointerEventPointing device is moved inside the hit-testing boundary.
pointerleavePointerEventPointing device is moved out of the hit-testing boundary.
pointerlockchangeEventThe pointer was locked or released.
pointerlockerrorEventIt was impossible to lock the pointer for technical reasons or because the permission was denied.
pointermovePointerEventThe pointer changed coordinates.
pointeroutPointerEventThe pointing device moved out of hit-testing boundary or leaves detectable hover range.
pointeroverPointerEventThe pointing device is moved into the hit-testing boundary.
pointerupPointerEventThe pointer leaves the active buttons state.
playEventPlayback has begun.
playingEventPlayback is ready to start after having been paused or delayed due to lack of data.
popstatePopStateEventA session history entry is being navigated to (in certain cases).
progressProgressEventIn progress.
pushPushEvent A Service Worker has received a push message.
pushsubscriptionchangePushEvent A PushSubscription has expired.
ratechangeEventThe playback rate has changed.
readystatechangeEventThe readyState attribute of a document has changed.
repeatEventTimeEventA SMIL animation element is repeated.
resetEventA form is reset.
resizeUIEventThe document view has been resized.
resourcetimingbufferfullPerformanceThe 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.
scrollUIEventThe document view or an element has been scrolled.
seekedEventA seek operation completed.
seekingEventA seek operation began.
selectUIEventSome text is being selected.
selectstart EventA selection just started.
selectionchange EventThe selection in the document has been changed.
showMouseEventA contextmenu event was fired on/bubbled to an element that has a contextmenu attribute
slotchangeEventThe node contents of a HTMLSlotElement (<slot>) have changed.
soundend EventAny sound — recognisable speech or not — has stopped being detected.
soundstart EventAny sound — recognisable speech or not — has been detected.
speechend EventSpeech recognised by the speech recognition service has stopped being detected.
speechstart EventSound that is recognised by the speech recognition service as speech has been detected.
stalledEventThe user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
start EventThe speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition.
startSpeechSynthesisEventThe utterance has begun to be spoken.
storageStorageEventA storage area (localStorage or sessionStorage) has changed.
submitEventA form is submitted.
successEventA request successfully completed.
suspendEventMedia data loading has been suspended.
SVGAbortSVGEventPage loading has been stopped before the SVG was loaded.
SVGErrorSVGEventAn error has occurred before the SVG was loaded.
SVGLoadSVGEventAn SVG document has been loaded and parsed.
SVGResizeSVGEventAn SVG document is being resized.
SVGScrollSVGEventAn SVG document is being scrolled.
SVGUnloadSVGEventAn SVG document has been removed from a window or frame.
SVGZoomSVGZoomEventAn SVG document is being zoomed.
timeoutProgressEvent
timeupdateEventThe time indicated by the currentTime attribute has been updated.
touchcancelTouchEventA touch point has been disrupted in an implementation-specific manners (too many touch points for example).
touchendTouchEventA touch point is removed from the touch surface.
touchmoveTouchEventA touch point is moved along the touch surface.
touchstartTouchEventA touch point is placed on the touch surface.
transitionendTransitionEvent A CSS transition has completed.
unloadUIEventThe 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.
userproximityUserProximityEvent Fresh data is available from a proximity sensor (indicates whether the nearby object is near the device or not).
voiceschanged EventThe list of SpeechSynthesisVoice objects that would be returned by the SpeechSynthesis.getVoices() method has changed (when the voiceschanged event fires.)
versionchange A versionchange transaction completed.
visibilitychangeEventThe content of a tab has become visible or has been hidden.
volumechangeEventThe volume has changed.
waitingEventPlayback has stopped because of a temporary lack of data.
wheelWheelEventA wheel button of a pointing device is rotated in any direction.

非标准事件

Event NameEvent TypeFired when...
afterscriptexecuteEventA script has been executed.
beforescriptexecuteEventA script is about to be executed.
beforeinstallpromptEventA user is prompted to save a web site to a home screen on mobile.
cardstatechange The MozMobileConnection.cardState property changes value.
changeDeviceStorageChangeEventThis 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 DragEventAn element is dropped (use drop instead).
dragexit DragEventA drag operation is being ended(use dragend instead).
draggesture DragEventThe 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.
MozAudioAvailableEventThe 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> changes.
mozbrowseraudioplaybackchange Sent when audio starts or stops playing within the browser <iframe> content.
mozbrowsercaretstatechanged Sent when the text selected inside the browser <iframe> content changes.
mozbrowserclose Sent when window.close() is called within a browser <iframe>.
mozbrowsercontextmenu Sent when a browser <iframe> try to open a context menu.
mozbrowserdocumentfirstpaint Sent when a new paint occurs on any document in the browser <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> content (see HTMLIFrameElement search methods.)
mozbrowserfirstpaint Sent when the <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> 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>'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> 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>'s window size has changed.
mozbrowserscroll Sent when the browser <iframe> content scrolls.
mozbrowserscrollareachanged Sent when the available scrolling area in the browser <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> 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> 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).
MozScrolledAreaChangedUIEventThe 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).
alertingCallEventThe correspondent is being alerted (his/her phone is ringing).
busyCallEventThe line of the correspondent is busy.
callschangedCallEventA call has been added or removed from the list of current calls.
onconnected connectedCallEventA call has been connected.
connectingCallEventA call is about to connect.
deliveredSMSEventAn SMS has been successfully delivered.
dialingCallEventThe number of a correspondent has been dialed.
disabled Wifi has been disabled on the device.
disconnectedCallEventA call has been disconnected.
disconnectingCallEventA call is about to disconnect.
enabled Wifi has been enabled on the device.
errorCallEventAn error occurred.
heldCallEventA call has been held.
holdingCallEventA call is about to be held.
incomingCallEventA call is being received.
receivedSMSEventAn SMS has been received.
resumingCallEventA call is about to resume.
sentSMSEventAn SMS has been sent.
statechangeCallEventThe state of a call has changed.
statuschange The status of the Wifi connection changed.
overflowUIEventAn 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.
touchenterTouchEvent
touchleaveTouchEvent
underflowUIEventAn element is no longer overflowed by its content (only works for elements styled with overflow != visible).
uploadprogress ProgressEventUpload is in progress (see progress).

ussdreceived

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

Mozilla 特定事件

注意:这些事件不会暴露给 Web 内容使用,只能在 chrome 内容的上下文中使用。

XUL 事件

Event NameEvent TypeSpecificationFired when...
broadcast XULAn observer noticed a change to the attributes of a watched broadcaster.
CheckboxStateChange XULThe state of a checkbox has been changed either by a user action or by a script (useful for accessibility).
close XULThe close button of the window has been clicked.
command XULAn element has been activated.
commandupdate XULA command update occurred on a commandset element.
DOMMenuItemActive XULA menu or menuitem has been hovered or highlighted.
DOMMenuItemInactive XULA menu or menuitem is no longer hovered or highlighted.
popuphiddenPopupEventXULA menupopup, panel or tooltip has been hidden.
popuphidingPopupEventXULA menupopup, panel or tooltip is about to be hidden.
popupshowingPopupEventXULA menupopup, panel or tooltip is about to become visible.
popupshownPopupEventXULA menupopup, panel or tooltip has become visible.
RadioStateChange XULThe state of a radio has been changed either by a user action or by a script (useful for accessibility).
ValueChange XULThe value of an element has changed (a progress bar for example, useful for accessibility).

附加组件特定事件

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

开发者工具特定事件

Event NameEvent TypeSpecificationFired when...
CssRuleViewRefreshed devtools specificThe "Rules" view of the style inspector has been updated.
CssRuleViewChanged devtools specificThe "Rules" view of the style inspector has been changed.
CssRuleViewCSSLinkClicked devtools specificA link to a CSS file has been clicked in the "Rules" view of the style inspector.

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

相关推荐:《vue.js教程》

以上就是vuejs支持哪些事件的详细内容,更多请关注dnjidi.com其它相关文章!