資源事件
| 事件名稱 | 何時觸發 |
|---|---|
error |
資源加載失敗時。 |
abort |
正在加載資源已經被中止時。 |
load |
資源及其相關資源已完成加載。 |
beforeunload |
window,document 及其資源即將被卸載。 |
unload |
文檔或一個依賴資源正在被卸載。 |
網絡事件
| 事件名稱 | 何時觸發 |
|---|---|
online |
瀏覽器已獲得網絡訪問。 |
offline |
瀏覽器已失去網絡訪問。 |
焦點事件
| 事件名稱 | 何時觸發 |
|---|---|
focus |
元素獲得焦點(不會冒泡)。 |
blur |
元素失去焦點(不會冒泡)。 |
WebSocket 事件
| 事件名稱 | 何時觸發 |
|---|---|
open |
WebSocket 連接已建立。 |
message |
通過 WebSocket 接收到一條消息。 |
error |
WebSocket 連接異常被關閉(比如有些數據無法發送)。 |
close |
WebSocket 連接已關閉。 |
會話歷史事件
| 事件名稱 | 何時觸發 |
|---|---|
pagehide |
A session history entry is being traversed from. |
pageshow |
A session history entry is being traversed to. |
popstate |
A session history entry is being navigated to (in certain cases). |
CSS 動畫事件
| 事件名稱 | 何時觸發 |
|---|---|
animationstart |
某個 CSS 動畫開始時觸發。 |
animationend |
某個 CSS 動畫完成時觸發。 |
animationiteration |
某個 CSS 動畫完成后重新開始時觸發。 |
CSS 過渡事件
| 事件名稱 | 何時觸發 |
|---|---|
transitionstart |
A CSS transition has actually started (fired after any delay). |
transitioncancel |
A CSS transition has been cancelled. |
transitionend |
A CSS transition has completed. |
transitionrun |
A CSS transition has begun running (fired before any delay starts). |
表單事件
| 事件名稱 | 何時觸發 |
|---|---|
reset |
點擊重置按鈕時 |
submit |
點擊提交按鈕 |
打印事件
| 時間名稱 | 何時觸發 |
|---|---|
beforeprint |
打印機已經就緒時觸發 |
afterprint |
打印機關閉時觸發 |
文本寫作事件
| Event Name | Fired When |
|---|---|
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. |
剪貼板事件
| Event Name | Fired When |
|---|---|
cut |
已經剪貼選中的文本內容並且復制到了剪貼板。 |
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 |
A seek operation completed. |
seeking |
A 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
更新事件
checkingdownloadingerrornoupdateobsoleteupdateready
值變化事件
broadcastCheckboxStateChangehashchangeinputRadioStateChangereadystatechangeValueChange
未分類的事件
不常見和非標准事件
Abortable Fetch events
| Event name | Fired when |
|---|---|
abort |
A DOM request is aborted, i.e. using AbortController.abort(). |
WebVR events
| Event name | Fired when |
|---|---|
vrdisplayactivate |
When a VR display is able to be presented to, for example if an HMD has been moved to bring it out of standby, or woken up by being put on. |
vrdisplayblur |
when presentation to a VRDisplay has been paused for some reason by the browser, OS, or VR hardware — for example, while the user is interacting with a system menu or browser, to prevent tracking or loss of experience. |
vrdisplayconnect |
when a compatible VRDisplay is connected to the computer. |
vrdisplaydeactivate |
When a VRDisplay can no longer be presented to, for example if an HMD has gone into standby or sleep mode due to a period of inactivity. |
vrdisplaydisconnect |
When a compatible VRDisplay is disconnected from the computer. |
vrdisplayfocus |
When presentation to a VRDisplay has resumed after being blurred. |
vrdisplaypresentchange |
The presenting state of a VRDisplay changes — i.e. goes from presenting to not presenting, or vice versa. |
SVG 事件
SVGAbortSVGErrorSVGLoadSVGResizeSVGScrollSVGUnloadSVGZoom
數據庫事件
abortblockedcompleteerrorsuccessupgradeneededversionchange
腳本事件
afterscriptexecutebeforescriptexecute
菜單事件
DOMMenuItemActiveDOMMenuItemInactive
窗口事件
彈出事件
popuphiddenpopuphidingpopupshowingpopupshown
Tab 事件
電池事件
chargingchangechargingtimechangedischargingtimechangelevelchange
呼叫事件
alertingbusycallschangedcfstatechangeconnectedconnectingdialingdisconnecteddisconnectingerrorheld, holdingincomingresumingstatechangevoicechange
傳感器事件
compassneedscalibrationdevicemotiondeviceorientationorientationchange
智能卡事件
icccardlockerroriccinfochangesmartcard-insertsmartcard-removestkcommandstksessionendcardstatechange
短信和USSD事件
deliveredreceivedsentussdreceived
幀事件
mozbrowserclosemozbrowsercontextmenumozbrowsererrormozbrowsericonchangemozbrowserlocationchangemozbrowserloadendmozbrowserloadstartmozbrowseropenwindowmozbrowsersecuritychangemozbrowsershowmodalpromptmozbrowsertitlechange
DOM變異事件
DOMAttributeNameChangedDOMAttrModifiedDOMCharacterDataModifiedDOMContentLoadedDOMElementNameChangedDOMNodeInsertedDOMNodeInsertedIntoDocumentDOMNodeRemovedDOMNodeRemovedFromDocumentDOMSubtreeModified
觸摸事件
touchcanceltouchendtouchmovetouchstart
指針事件
pointeroverpointerenterpointerdownpointermovepointeruppointercancelpointeroutpointerleavegotpointercapturelostpointercapture
標准事件
這些事件在官方Web規范中定義,並且應在各個瀏覽器中通用。 每個事件都和代表事件接收方的對象(由此您可以查到每個事件提供的數據),定義這個事件的標准或標准鏈接會一起列出。
| 事件名稱 | 事件類型 | 規范 | 觸發時機... |
|---|---|---|---|
abort |
UIEvent |
DOM L3 | 資源載入已被中止 |
abort |
ProgressEvent |
ProgressandXMLHttpRequest | Progress被終止(不是error造成的) |
abort |
Event |
IndexedDB | 事務已被中止 |
afterprint |
Event |
HTML5 | 相關文檔已開始打印或打印預覽已被關閉 |
animationcancel |
AnimationEvent |
CSS Animations | A CSS animation has aborted. |
animationend |
AnimationEvent |
CSS Animations | 完成一個CSS 動畫 |
animationiteration |
AnimationEvent |
CSS Animations | 重復播放一個CSS 動畫 |
animationstart |
AnimationEvent |
CSS Animations | 一個 CSS 動畫已開始 |
appinstalled |
Event |
Web App Manifest | A web application is successfully installed as a progressive web app. |
audioprocess |
AudioProcessingEvent |
Web Audio API audioprocess |
一個ScriptProcessorNode 的輸入緩沖區可處理 |
audioend |
Event |
Web Speech API | 用戶代理捕捉到用以語音識別的音頻 |
audiostart |
Event |
Web Speech API | 用戶代理開始捕捉用以語音識別的音頻 |
beforeprint |
Event |
HTML5 | 相關文檔將要開始打印或准備打印預覽 |
beforeunload |
BeforeUnloadEvent |
HTML5 | 即將卸載 window,document 及其資源 |
beginEvent |
TimeEvent |
SVG | A SMIL animation element begins. |
blocked |
IndexedDB | An open connection to a database is blocking a versionchange transaction on the same database. |
|
blur |
FocusEvent |
DOM L3 | An element has lost focus (does not bubble). |
boundary |
SpeechSynthesisEvent |
Web Speech API | The spoken utterance reaches a word or sentence boundary |
canplay |
Event |
HTML5 media | The 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. |
canplaythrough |
Event |
HTML5 media | The user agent can play the media up to its end without having to stop for further buffering of content. |
change |
Event |
DOM L2, HTML5 | The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user. |
chargingchange |
Event |
Battery status | The battery begins or stops charging. |
chargingtimechange |
Event |
Battery status | The chargingTime attribute has been updated. |
click |
MouseEvent |
DOM L3 | A pointing device button has been pressed and released on an element. |
close |
Event |
WebSocket | A WebSocket connection has been closed. |
complete |
IndexedDB | A transaction successfully completed. | |
complete |
OfflineAudioCompletionEvent |
Web Audio API OfflineAudioCompletionEvent |
The rendering of an OfflineAudioContext is terminated. |
compositionend |
CompositionEvent |
DOM L3 | The composition of a passage of text has been completed or canceled. |
compositionstart |
CompositionEvent |
DOM L3 | 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 |
CompositionEvent |
DOM L3 | A character is added to a passage of text being composed. |
contextmenu |
MouseEvent |
HTML5 | The right button of the mouse is clicked (before the context menu is displayed). |
copy |
ClipboardEvent |
Clipboard | The text selection has been added to the clipboard. |
cut |
ClipboardEvent |
Clipboard | The text selection has been removed from the document and added to the clipboard. |
dblclick |
MouseEvent |
DOM L3 | A pointing device button is clicked twice on an element. |
devicechange |
Event |
Media Capture and Streams | A media device such as a camera, microphone, or speaker is connected or removed from the system. |
devicemotion |
DeviceMotionEvent |
Device Orientation Events | Fresh data is available from a motion sensor. |
deviceorientation |
DeviceOrientationEvent |
Device Orientation Events | Fresh data is available from an orientation sensor. |
dischargingtimechange |
Event |
Battery status | The dischargingTime attribute has been updated. |
DOMActivate |
UIEvent |
DOM L3 | A button, link or state changing element is activated (use click instead). |
DOMAttributeNameChanged |
MutationNameEvent |
DOM L3 Removed | The name of an attribute changed (use mutation observers instead). |
DOMAttrModified |
MutationEvent |
DOM L3 | The value of an attribute has been modified (use mutation observers instead). |
DOMCharacterDataModified |
MutationEvent |
DOM L3 | A text or another CharacterData has changed (use mutation observers instead). |
DOMContentLoaded |
Event |
HTML5 | The document has finished loading (but not its dependent resources). |
DOMElementNameChanged |
MutationNameEvent |
DOM L3 Removed | The name of an element changed (use mutation observers instead). |
DOMFocusIn |
FocusEvent |
DOM L3 | An element has received focus (use focus or focusin instead). |
DOMFocusOut |
FocusEvent |
DOM L3 | An element has lost focus (use blur or focusout instead). |
DOMNodeInserted |
MutationEvent |
DOM L3 | A node has been added as a child of another node (use mutation observers instead). |
DOMNodeInsertedIntoDocument |
MutationEvent |
DOM L3 | A node has been inserted into the document (use mutation observers instead). |
DOMNodeRemoved |
MutationEvent |
DOM L3 | A node has been removed from its parent node (use mutation observers instead). |
DOMNodeRemovedFromDocument |
MutationEvent |
DOM L3 | A node has been removed from the document (use mutation observers instead). |
DOMSubtreeModified |
MutationEvent |
DOM L3 | A change happened in the document (use mutation observers instead). |
drag |
DragEvent |
HTML5 | An element or text selection is being dragged (every 350ms). |
dragend |
DragEvent |
HTML5 | A drag operation is being ended (by releasing a mouse button or hitting the escape key). |
dragenter |
DragEvent |
HTML5 | A dragged element or text selection enters a valid drop target. |
dragleave |
DragEvent |
HTML5 | A dragged element or text selection leaves a valid drop target. |
dragover |
DragEvent |
HTML5 | An element or text selection is being dragged over a valid drop target (every 350ms). |
dragstart |
DragEvent |
HTML5 | The user starts dragging an element or text selection. |
drop |
DragEvent |
HTML5 | An element is dropped on a valid drop target. |
durationchange |
Event |
HTML5 media | The duration attribute has been updated. |
emptied |
Event |
HTML5 media | 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 |
Web Speech API | The speech recognition service has disconnected. |
end |
SpeechSynthesisEvent |
Web Speech API | The utterance has finished being spoken. |
ended |
Event |
HTML5 media | Playback has stopped because the end of the media was reached. |
ended |
Event |
Web Audio API | Playback has stopped because the end of the media was reached. |
endEvent |
TimeEvent |
SVG | A SMIL animation element ends. |
error |
UIEvent |
DOM L3 | A resource failed to load. |
error |
ProgressEvent |
Progress and XMLHttpRequest | Progression has failed. |
error |
Event |
WebSocket | A WebSocket connection has been closed with prejudice (some data couldn't be sent for example). |
error |
Event |
Server Sent Events | An event source connection has been failed. |
error |
Event |
IndexedDB | A request caused an error and failed. |
error |
Event |
Web Speech API | A speech recognition error occurs. |
error |
SpeechSynthesisErrorEvent |
Web Speech API | An error occurs that prevents the utterance from being successfully spoken. |
focus |
FocusEvent |
DOM L3 | An element has received focus (does not bubble). |
focusin |
FocusEvent |
DOM L3 | An element is about to receive focus (bubbles). |
focusout |
FocusEvent |
DOM L3 | An element is about to lose focus (bubbles). |
fullscreenchange |
Event |
Full Screen | An element was turned to fullscreen mode or back to normal mode. |
fullscreenerror |
Event |
Full Screen | It was impossible to switch to fullscreen mode for technical reasons or because the permission was denied. |
gamepadconnected |
GamepadEvent |
Gamepad | A gamepad has been connected. |
gamepaddisconnected |
GamepadEvent |
Gamepad | A gamepad has been disconnected. |
gotpointercapture |
PointerEvent |
Pointer Events | Element receives pointer capture. |
hashchange |
HashChangeEvent |
HTML5 | The fragment identifier of the URL has changed (the part of the URL after the #). |
lostpointercapture |
PointerEvent |
Pointer Events | Element lost pointer capture. |
input |
Event |
HTML5 | The value of an element changes or the content of an element with the attribute contenteditable is modified. |
invalid |
Event |
HTML5 | A submittable element has been checked and doesn't satisfy its constraints. |
keydown |
KeyboardEvent |
DOM L3 | A key is pressed down. |
keypress |
KeyboardEvent |
DOM L3 | A key is pressed down and that key normally produces a character value (use input instead). |
keyup |
KeyboardEvent |
DOM L3 | A key is released. |
languagechange |
Event |
HTML 5.1 NavigatorLanguage.languages |
The user's preferred languages have changed. |
levelchange |
Event |
Battery status | The level attribute has been updated. |
load |
UIEvent |
DOM L3 | A resource and its dependent resources have finished loading. |
load |
ProgressEvent |
Progress and XMLHttpRequest | Progression has been successful. |
loadeddata |
Event |
HTML5 media | The first frame of the media has finished loading. |
loadedmetadata |
Event |
HTML5 media | The metadata has been loaded. |
loadend |
ProgressEvent |
Progress and XMLHttpRequest | Progress has stopped (after "error", "abort" or "load" have been dispatched). |
loadstart |
ProgressEvent |
Progress and XMLHttpRequest | Progress has begun. |
mark |
SpeechSynthesisEvent |
Web Speech API | The spoken utterance reaches a named SSML "mark" tag. |
message |
MessageEvent |
WebSocket | A message is received through a WebSocket. |
message |
MessageEvent |
Web Workers | A message is received from a Web Worker. |
message |
MessageEvent |
Web Messaging | A message is received from a child (i)frame or a parent window. |
message |
MessageEvent |
Server Sent Events | A message is received through an event source. |
messageerror |
MessageEvent |
MessagePort, Web Workers, Broadcast Channel, Window |
A message error is raised when a message is received by an object. |
message |
ServiceWorkerMessageEvent or ExtendableMessageEvent, depending on context. |
Service Workers | A message is received from a service worker, or a message is received in a service worker from another context. |
mousedown |
MouseEvent |
DOM L3 | A pointing device button (usually a mouse) is pressed on an element. |
mouseenter |
MouseEvent |
DOM L3 | A pointing device is moved onto the element that has the listener attached. |
mouseleave |
MouseEvent |
DOM L3 | A pointing device is moved off the element that has the listener attached. |
mousemove |
MouseEvent |
DOM L3 | A pointing device is moved over an element. |
mouseout |
MouseEvent |
DOM L3 | A pointing device is moved off the element that has the listener attached or off one of its children. |
mouseover |
MouseEvent |
DOM L3 | A pointing device is moved onto the element that has the listener attached or onto one of its children. |
mouseup |
MouseEvent |
DOM L3 | A pointing device button is released over an element. |
nomatch |
SpeechRecognitionEvent |
Web Speech API | The speech recognition service returns a final result with no significant recognition. |
notificationclick |
NotificationEvent |
Notifications API onnotificationclick |
A system notification spawned by ServiceWorkerRegistration.showNotification() has been clicked. |
offline |
Event |
HTML5 offline | The browser has lost access to the network. |
online |
Event |
HTML5 offline | The browser has gained access to the network (but particular websites might be unreachable). |
open |
Event |
WebSocket | A WebSocket connection has been established. |
open |
Event |
Server Sent Events | An event source connection has been established. |
orientationchange |
Event |
Screen Orientation | The orientation of the device (portrait/landscape) has changed |
pagehide |
PageTransitionEvent |
HTML5 | A session history entry is being traversed from. |
pageshow |
PageTransitionEvent |
HTML5 | A session history entry is being traversed to. |
paste |
ClipboardEvent |
Clipboard | Data has been transferred from the system clipboard to the document. |
pause |
Event |
HTML5 media | Playback has been paused. |
pause |
SpeechSynthesisEvent |
Web Speech API | The utterance is paused part way through. |
pointercancel |
PointerEvent |
Pointer Events | The pointer is unlikely to produce any more events. |
pointerdown |
PointerEvent |
Pointer Events | The pointer enters the active buttons state. |
pointerenter |
PointerEvent |
Pointer Events | Pointing device is moved inside the hit-testing boundary. |
pointerleave |
PointerEvent |
Pointer Events | Pointing device is moved out of the hit-testing boundary. |
pointerlockchange |
Event |
Pointer Lock | The pointer was locked or released. |
pointerlockerror |
Event |
Pointer Lock | It was impossible to lock the pointer for technical reasons or because the permission was denied. |
pointermove |
PointerEvent |
Pointer Events | The pointer changed coordinates. |
pointerout |
PointerEvent |
Pointer Events | The pointing device moved out of hit-testing boundary or leaves detectable hover range. |
pointerover |
PointerEvent |
Pointer Events | The pointing device is moved into the hit-testing boundary. |
pointerup |
PointerEvent |
Pointer Events | The pointer leaves the active buttons state. |
play |
Event |
HTML5 media | Playback has begun. |
playing |
Event |
HTML5 media | Playback is ready to start after having been paused or delayed due to lack of data. |
popstate |
PopStateEvent |
HTML5 | A session history entry is being navigated to (in certain cases). |
progress |
ProgressEvent |
Progress and XMLHttpRequest | In progress. |
push |
PushEvent |
Push API | A Service Worker has received a push message. |
pushsubscriptionchange |
PushEvent |
Push API | A PushSubscription has expired. |
ratechange |
Event |
HTML5 media | The playback rate has changed. |
readystatechange |
Event |
HTML5 and XMLHttpRequest | The readyState attribute of a document has changed. |
repeatEvent |
TimeEvent |
SVG | A SMIL animation element is repeated. |
reset |
Event |
DOM L2, HTML5 | A form is reset. |
resize |
UIEvent |
DOM L3 | The document view has been resized. |
resourcetimingbufferfull |
Performance |
Resource Timing | The browser's resource timing buffer is full. |
result |
SpeechRecognitionEvent |
Web Speech API | 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 |
Web Speech API | A paused utterance is resumed. |
scroll |
UIEvent |
DOM L3 | The document view or an element has been scrolled. |
seeked |
Event |
HTML5 media | A seek operation completed. |
seeking |
Event |
HTML5 media | A seek operation began. |
select |
UIEvent |
DOM L3 | Some text is being selected. |
selectstart |
Event |
Selection API | A selection just started. |
selectionchange |
Event |
Selection API | The selection in the document has been changed. |
show |
MouseEvent |
HTML5 | A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute |
slotchange |
Event |
DOM | The node contents of a HTMLSlotElement (<slot>) have changed. |
soundend |
Event |
Web Speech API | Any sound — recognisable speech or not — has stopped being detected. |
soundstart |
Event |
Web Speech API | Any sound — recognisable speech or not — has been detected. |
speechend |
Event |
Web Speech API | Speech recognised by the speech recognition service has stopped being detected. |
speechstart |
Event |
Web Speech API | Sound that is recognised by the speech recognition service as speech has been detected. |
stalled |
Event |
HTML5 media | The user agent is trying to fetch media data, but data is unexpectedly not forthcoming. |
start |
Event |
Web Speech API | The speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current SpeechRecognition. |
start |
SpeechSynthesisEvent |
Web Speech API | The utterance has begun to be spoken. |
storage |
StorageEvent |
Web Storage | A storage area (localStorage or sessionStorage) has changed. |
submit |
Event |
DOM L2, HTML5 | A form is submitted. |
success |
Event |
IndexedDB | A request successfully completed. |
suspend |
Event |
HTML5 media | Media data loading has been suspended. |
SVGAbort |
SVGEvent |
SVG | Page loading has been stopped before the SVG was loaded. |
SVGError |
SVGEvent |
SVG | An error has occurred before the SVG was loaded. |
SVGLoad |
SVGEvent |
SVG | An SVG document has been loaded and parsed. |
SVGResize |
SVGEvent |
SVG | An SVG document is being resized. |
SVGScroll |
SVGEvent |
SVG | An SVG document is being scrolled. |
SVGUnload |
SVGEvent |
SVG | An SVG document has been removed from a window or frame. |
SVGZoom |
SVGZoomEvent |
SVG | An SVG document is being zoomed. |
timeout |
ProgressEvent |
XMLHttpRequest | |
timeupdate |
Event |
HTML5 media | The time indicated by the currentTime attribute has been updated. |
touchcancel |
TouchEvent |
Touch Events | A touch point has been disrupted in an implementation-specific manners (too many touch points for example). |
touchend |
TouchEvent |
Touch Events | A touch point is removed from the touch surface. |
touchmove |
TouchEvent |
Touch Events | A touch point is moved along the touch surface. |
touchstart |
TouchEvent |
Touch Events | A touch point is placed on the touch surface. |
transitionend |
TransitionEvent |
CSS Transitions | A CSS transition has completed. |
unload |
UIEvent |
DOM L3 | The document or a dependent resource is being unloaded. |
upgradeneeded |
IndexedDB | 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 |
Proximity Sensor | Fresh data is available from a proximity sensor (indicates whether the nearby object is near the device or not). |
voiceschanged |
Event |
Web Speech API | The list of SpeechSynthesisVoice objects that would be returned by the SpeechSynthesis.getVoices() method has changed (when the voiceschanged event fires.) |
versionchange |
IndexedDB | A versionchange transaction completed. |
|
visibilitychange |
Event |
Page visibility | The content of a tab has become visible or has been hidden. |
volumechange |
Event |
HTML5 media | The volume has changed. |
waiting |
Event |
HTML5 media | Playback has stopped because of a temporary lack of data. |
wheel |
WheelEvent |
DOM L3 | A wheel button of a pointing device is rotated in any direction. |
非標准事件
| Event Name | Event Type | Specification | Fired when... |
|---|---|---|---|
afterscriptexecute |
Event |
Mozilla Specific | A script has been executed. |
beforescriptexecute |
Event |
Mozilla Specific | A script is about to be executed. |
beforeinstallprompt |
Event |
Chrome specific | A user is prompted to save a web site to a home screen on mobile. |
cardstatechange |
Firefox OS specific | The MozMobileConnection.cardState property changes value. |
|
change |
DeviceStorageChangeEvent |
Firefox OS specific | This event is triggered each time a file is created, modified or deleted on a given storage area. |
connectionInfoUpdate |
Firefox OS specific | The informations about the signal strength and the link speed have been updated. | |
cfstatechange |
Firefox OS specific | The call forwarding state changes. | |
datachange |
Firefox OS specific | The MozMobileConnection.data object changes values. |
|
dataerror |
Firefox OS specific | The MozMobileConnection.data object receive an error from the RIL. |
|
DOMMouseScroll |
Mozilla specific | The wheel button of a pointing device is rotated (detail attribute is a number of lines). (use wheel instead) |
|
dragdrop |
DragEvent |
Mozilla specific | An element is dropped (use drop instead). |
dragexit |
DragEvent |
Mozilla specific | A drag operation is being ended(use dragend instead). |
draggesture |
DragEvent |
Mozilla specific | The user starts dragging an element or text selection (use dragstart instead). |
icccardlockerror |
Firefox OS specific | the MozMobileConnection.unlockCardLock() or MozMobileConnection.setCardLock() methods fails. |
|
iccinfochange |
Firefox OS specific | The MozMobileConnection.iccInfo object changes. |
|
localized |
Mozilla Specific | The page has been localized using data-l10n-* attributes. | |
mousewheel |
IE invented | The wheel button of a pointing device is rotated. | |
MozAudioAvailable |
Event |
Mozilla specific | The audio buffer is full and the corresponding raw samples are available. |
MozBeforeResize |
Mozilla specific | A window is about to be resized. | |
mozbrowseractivitydone |
Firefox OS Browser API-specific | Sent when some activity has been completed (complete description TBD.) | |
mozbrowserasyncscroll |
Firefox OS Browser API-specific | Sent when the scroll position within a browser <iframe> changes. |
|
mozbrowseraudioplaybackchange |
Firefox OS Browser API-specific | Sent when audio starts or stops playing within the browser <iframe> content. |
|
mozbrowsercaretstatechanged |
Firefox OS Browser API-specific | Sent when the text selected inside the browser <iframe> content changes. |
|
mozbrowserclose |
Firefox OS Browser API-specific | Sent when window.close() is called within a browser <iframe>. |
|
mozbrowsercontextmenu |
Firefox OS Browser API-specific | Sent when a browser <iframe> try to open a context menu. |
|
mozbrowserdocumentfirstpaint |
Firefox OS Browser API-specific | Sent when a new paint occurs on any document in the browser <iframe>. |
|
mozbrowsererror |
Firefox OS Browser API-specific | Sent when an error occured while trying to load a content within a browser iframe | |
mozbrowserfindchange |
Firefox OS Browser API-specific | Sent when a search operation is performed on the browser <iframe> content (see HTMLIFrameElement search methods.) |
|
mozbrowserfirstpaint |
Firefox OS Browser API-specific | Sent when the <iframe> paints content for the first time (this doesn't include the initial paint from about:blank.) |
|
mozbrowsericonchange |
Firefox OS Browser API-specific | Sent when the favicon of a browser iframe changes. | |
mozbrowserlocationchange |
Firefox OS Browser API-specific | Sent when an browser iframe's location changes. | |
mozbrowserloadend |
Firefox OS Browser API-specific | Sent when the browser iframe has finished loading all its assets. | |
mozbrowserloadstart |
Firefox OS Browser API-specific | Sent when the browser iframe starts to load a new page. | |
mozbrowsermanifestchange |
Firefox OS Browser API-specific | 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 |
Firefox OS Browser API-specific | Sent when a <meta> elelment is added to, removed from or changed in the browser <iframe>'s content. |
|
mozbrowseropensearch |
Firefox OS Browser API-specific | Sent when a link to a search engine is found. | |
mozbrowseropentab |
Firefox OS Browser API-specific | 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 |
Firefox OS Browser API-specific | Sent when window.open() is called within a browser iframe. |
|
mozbrowserresize |
Firefox OS Browser API-specific | Sent when the browser <iframe>'s window size has changed. |
|
mozbrowserscroll |
Firefox OS Browser API-specific | Sent when the browser <iframe> content scrolls. |
|
mozbrowserscrollareachanged |
Firefox OS Browser API-specific | 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 |
Firefox OS Browser API-specific | Sent when asynchronous scrolling (i.e. APCZ) starts or stops. | |
mozbrowsersecuritychange |
Firefox OS Browser API-specific | Sent when the SSL state changes within a browser iframe. | |
mozbrowserselectionstatechanged |
Firefox OS Browser API-specific | Sent when the text selected inside the browser <iframe> content changes. Note that this is deprecated, and newer implementations use mozbrowsercaretstatechanged instead. |
|
mozbrowsershowmodalprompt |
Firefox OS Browser API-specific | Sent when alert(), confirm() or prompt() are called within a browser iframe |
|
mozbrowsertitlechange |
Firefox OS Browser API-specific | Sent when the document.title changes within a browser iframe. | |
mozbrowserusernameandpasswordrequired |
Firefox OS Browser API-specific | Sent when an HTTP authentification is requested. | |
mozbrowservisibilitychange |
Firefox OS Browser API-specific | Sent when the visibility state of the current browser iframe <iframe> changes, for example due to a call to setVisible(). |
|
MozGamepadButtonDown |
To be specified | A gamepad button is pressed down. | |
MozGamepadButtonUp |
To be specified | A gamepad button is released. | |
MozMousePixelScroll |
Mozilla specific | The wheel button of a pointing device is rotated (detail attribute is a number of pixels). (use wheel instead) | |
MozOrientation |
Mozilla specific | Fresh data is available from an orientation sensor (see deviceorientation). | |
MozScrolledAreaChanged |
UIEvent |
Mozilla specific | The document view has been scrolled or resized. |
moztimechange |
Mozilla specific | The time of the device has been changed. | |
| MozTouchDown | Mozilla specific | A touch point is placed on the touch surface (use touchstart instead). | |
| MozTouchMove | Mozilla specific | A touch point is moved along the touch surface (use touchmove instead). | |
| MozTouchUp | Mozilla specific | A touch point is removed from the touch surface (use touchend instead). | |
alerting |
CallEvent |
To be specified | The correspondent is being alerted (his/her phone is ringing). |
busy |
CallEvent |
To be specified | The line of the correspondent is busy. |
callschanged |
CallEvent |
To be specified | A call has been added or removed from the list of current calls. |
onconnected connected |
CallEvent |
To be specified | A call has been connected. |
connecting |
CallEvent |
To be specified | A call is about to connect. |
delivered |
SMSEvent |
To be specified | An SMS has been successfully delivered. |
dialing |
CallEvent |
To be specified | The number of a correspondent has been dialed. |
disabled |
Firefox OS specific | Wifi has been disabled on the device. | |
disconnected |
CallEvent |
To be specified | A call has been disconnected. |
disconnecting |
CallEvent |
To be specified | A call is about to disconnect. |
enabled |
Firefox OS specific | Wifi has been enabled on the device. | |
error |
CallEvent |
To be specified | An error occurred. |
held |
CallEvent |
To be specified | A call has been held. |
holding |
CallEvent |
To be specified | A call is about to be held. |
incoming |
CallEvent |
To be specified | A call is being received. |
received |
SMSEvent |
To be specified | An SMS has been received. |
resuming |
CallEvent |
To be specified | A call is about to resume. |
sent |
SMSEvent |
To be specified | An SMS has been sent. |
statechange |
CallEvent |
To be specified | The state of a call has changed. |
statuschange |
Firefox OS specific | The status of the Wifi connection changed. | |
overflow |
UIEvent |
Mozilla specific | 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 |
Mozilla specific | A smartcard has been inserted. | |
smartcard-remove |
Mozilla specific | A smartcard has been removed. | |
stkcommand |
Firefox OS specific | The STK Proactive Command is issued from ICC. | |
stksessionend |
Firefox OS specific | The STK Session is terminated by ICC. | |
touchenter |
TouchEvent |
Touch Events Removed | |
touchleave |
TouchEvent |
Touch Events Removed | |
underflow |
UIEvent |
Mozilla specific | An element is no longer overflowed by its content (only works for elements styled with overflow != visible). |
uploadprogress |
ProgressEvent |
Mozilla Specific | Upload is in progress (see progress). |
| Firefox OS specific | A new USSD message is received | ||
voicechange |
Firefox OS specific | The MozMobileConnection.voice object changes values. |
|
msContentZoom |
Microsoft specific | ||
MSManipulationStateChanged |
Microsoft specific | ||
MSPointerHover |
Microsoft specific |
Mozilla 特定事件
注意:這些事件不會暴露給 Web 內容使用,只能在 chrome 內容的上下文中使用。
XUL 事件
| Event Name | Event Type | Specification | Fired when... |
|---|---|---|---|
broadcast |
XUL | An observer noticed a change to the attributes of a watched broadcaster. |
|
CheckboxStateChange |
XUL | The state of a checkbox has been changed either by a user action or by a script (useful for accessibility). |
|
| close | XUL | The close button of the window has been clicked. | |
command |
XUL | An element has been activated. | |
commandupdate |
XUL | A command update occurred on a commandset element. |
|
DOMMenuItemActive |
XUL | A menu or menuitem has been hovered or highlighted. | |
DOMMenuItemInactive |
XUL | A menu or menuitem is no longer hovered or highlighted. | |
popuphidden |
PopupEvent |
XUL | A menupopup, panel or tooltip has been hidden. |
popuphiding |
PopupEvent |
XUL | A menupopup, panel or tooltip is about to be hidden. |
popupshowing |
PopupEvent |
XUL | A menupopup, panel or tooltip is about to become visible. |
popupshown |
PopupEvent |
XUL | A menupopup, panel or tooltip has become visible. |
RadioStateChange |
XUL | The state of a radio has been changed either by a user action or by a script (useful for accessibility). |
|
ValueChange |
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 | A meta element has been added to a document. |
|
| DOMMetaRemoved | Addons specific | A 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 | A notification element is shown. |
|
| AlertClose | Addons specific | A 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. |
