赞
踩
原文来源于MDN,有时候MDN无法访问,可以自己参考下面的说明。
DOM 事件被发送用于通知代码相关的事情已经发生了。每个事件都是继承自Event
类的对象,可以包括自定义的成员属性及函数用于获取事件发生时相关的更多信息。事件可以表示从基本用户交互到渲染模型中发生的事件的自动通知的所有内容。
本文提供了一个可以发送的事件的列表;一些是官方标准中的标准事件,另一些则是在特定浏览器内部使用的事件;例如,Mozilla 列出的特定事件使 拓展 可以用它们与浏览器交互。
事件名称 | 何时触发 |
---|---|
cached | manifest中列出的资源已经下载,应用程序现在已缓存。 |
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). |
事件触发 | 何时触发 |
---|---|
animationstart | 某个CSS动画开始时触发 |
animationend | 某个CSS动画完成时触发 |
animationiteration | 某个CSS动画完成后重新开始时触发 |
事件名称 | 何时触发 |
---|---|
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 |
---|---|
mouseenter | 指针移到有事件监听的元素内 |
mouseover | 指针移到有事件监听的元素或者它的子元素内 |
mousemove | 指针在元素内移动时持续触发 |
mousedown | 在元素上按下任意鼠标按钮 |
mouseup | 在元素上释放任意鼠标按键 |
click | 在元素上按下并释放任意鼠标按键 |
dblclick | 在元素上双击鼠标按钮 |
contextmenu | 右键点击 (右键菜单显示前). |
wheel | 滚轮向任意方向滚动 |
mouseleave | 指针移出元素范围外(不冒泡) |
mouseout | 指针移出元素,或者移到它的子元素上 |
select | 文本被选中被选中 |
pointerlockchange | 鼠标被锁定或者解除锁定发生时 |
pointerlockerror | 可能因为一些技术的原因鼠标锁定被禁止时。 |
Event Name | Fired When |
---|---|
dragstart | 用户开始拖动HTML元素或选中的文本 |
drag | 正在拖动元素或文本选区(在此过程中持续触发,每350ms触发一次) |
dragend | 拖放操作结束 (松开鼠标按钮或按下Esc键) |
dragenter | 被拖动的元素或文本选区移入有效释放目标区 |
dragover | 被拖动的元素或文本选区正在有效释放目标上被拖动 (在此过程中持续触发,每350ms触发一次) |
dragleave | 被拖动的元素或文本选区移出有效释放目标区 |
drop | 元素在有效释放目标区上释放 |
Event Name | Fired When |
---|---|
durationchange | The duration attribute has been updated. |
loadedmetadata | The metadata has been loaded. |
loadeddata | The first frame of the media has finished loading. |
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. |
ended | Playback has stopped because the end of the media was reached. |
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. |
stalled | The user agent is trying to fetch media data, but data is unexpectedly not forthcoming. |
suspend | Media data loading has been suspended. |
play | Playback has begun. |
playing | Playback is ready to start after having been paused or delayed due to lack of data. |
pause | Playback has been paused. |
waiting | Playback has stopped because of a temporary lack of data. |
seeking | A seek operation began. |
seeked | A seek operation completed. |
ratechange | The playback rate has changed. |
timeupdate | The time indicated by the currentTime attribute has been updated. |
volumechange | The volume has changed. |
complete | The rendering of an OfflineAudioContext is terminated. |
ended | Playback has stopped because the end of the media was reached. |
audioprocess | The input buffer of a ScriptProcessorNode is ready to be processed. |
Event Name | Fired When |
---|---|
loadstart | Progress has begun. |
progress | In progress. |
error | Progression has failed. |
timeout | Progression is terminated due to preset time expiring. |
abort | Progression has been terminated (not due to an error). |
load | Progression has been successful. |
loadend | Progress has stopped (after "error", "abort" or "load" have been dispatched). |
change
(see Non-standard events)storage
checking
downloading
error
noupdate
obsolete
updateready
broadcast
CheckboxStateChange
hashchange
input
RadioStateChange
readystatechange
ValueChange
invalid
localized
message
message
message
open
show
SVGAbort
SVGError
SVGLoad
SVGResize
SVGScroll
SVGUnload
SVGZoom
abort
blocked
complete
error
(link)success
upgradeneeded
versionchange
CssRuleViewRefreshedCssRuleViewChangedCssRuleViewCSSLinkClickedtransitionend
afterscriptexecute
beforescriptexecute
DOMMenuItemActive
DOMMenuItemInactive
DOMWindowCreatedDOMTitleChangedDOMWindowCloseSSWindowClosingSSWindowStateReadySSWindowStateBusyclose
DOMLinkAddedDOMLinkRemovedDOMMetaAddedDOMMetaRemovedDOMWillOpenModalDialogDOMModalDialogClosed
popuphidden
popuphiding
popupshowing
popupshown
DOMPopupBlocked
TabOpenTabCloseTabSelectTabShowTabHideTabPinnedTabUnpinnedSSTabClosingSSTabRestoringSSTabRestoredvisibilitychange
chargingchange
chargingtimechange
dischargingtimechange
levelchange
alerting
busy
callschanged
cfstatechange
connected
connecting
dialing
disconnected
disconnecting
error
held
, holding
incoming
resuming
statechange
voicechange
compassneedscalibration
devicelight
devicemotion
deviceorientation
deviceproximity
MozOrientation
orientationchange
userproximity
icccardlockerror
iccinfochange
smartcard-insert
smartcard-remove
stkcommand
stksessionend
cardstatechange
delivered
received
sent
ussdreceived
mozbrowserclose
mozbrowsercontextmenu
mozbrowsererror
mozbrowsericonchange
mozbrowserlocationchange
mozbrowserloadend
mozbrowserloadstart
mozbrowseropenwindow
mozbrowsersecuritychange
mozbrowsershowmodalprompt
(link)mozbrowsertitlechange
DOMFrameContentLoaded
DOMAttributeNameChanged
DOMAttrModified
DOMCharacterDataModified
DOMContentLoaded
DOMElementNameChanged
DOMNodeInserted
DOMNodeInsertedIntoDocument
DOMNodeRemoved
DOMNodeRemovedFromDocument
DOMSubtreeModified
MozEdgeUIGestureMozMagnifyGestureMozMagnifyGestureStartMozMagnifyGestureUpdateMozPressTapGestureMozRotateGestureMozRotateGestureStartMozRotateGestureUpdateMozSwipeGestureMozTapGestureMozTouchDownMozTouchMoveMozTouchUptouchcancel
touchend
touchenter
touchleave
touchmove
touchstart
pointerover
pointerenter
pointerdown
pointermove
pointerup
pointercancel
pointerout
pointerleave
gotpointercapture
lostpointercapture
这些事件在官方Web规范中定义,并且应在各个浏览器中通用。 每个事件都和代表事件接收方的对象(由此您可以查到每个事件提供的数据),定义这个事件的标准或标准链接会一起列出。
事件名称 | 事件类型 | 规范 | 触发时机... |
---|---|---|---|
abort | UIEvent | DOM L3 | 资源载入已被中止 |
abort | ProgressEvent | ProgressandXMLHttpRequest | Progress被终止(不是error造成的) |
abort | Event | IndexedDB | 事务已被中止 |
afterprint | Event | HTML5 | 相关文档已开始打印或打印预览已被关闭 |
animationend | AnimationEvent | CSS Animations | 完成一个CSS 动画 |
animationiteration | AnimationEvent | CSS Animations | 重复播放一个CSS 动画 |
animationstart | AnimationEvent | CSS Animations | 一个CSS 动画已开始 |
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 | ASMILanimation element begins. |
blocked_indexedDB | IDBVersionChangeEvent | IndexedDB | An open connection to a database is blocking aversionchange transaction on the same database. |
blur | FocusEvent | DOM L3 | 元素失去焦点 (不会冒泡). |
boundary | SpeechSynthesisEvent | SpeechSynthesisEvent | |
cached | Event | Offline | The resources listed in the manifest have been downloaded, and the application is now cached. |
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, and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content. |
change | Event | DOM L2,HTML5 | An element loses focus and its value changed since gaining focus. |
chargingchange | Event | Battery status | The battery begins or stops charging. |
chargingtimechange | Event | Battery status | ThechargingTime attribute has been updated. |
checking | Event | Offline | The user agent is checking for an update, or attempting to download the cache manifest for the first time. |
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 | ||
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. |
devicelight | DeviceLightEvent | Ambient Light Events | Fresh data is available from a light sensor. |
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. |
deviceproximity | DeviceProximityEvent | Proximity Events | Fresh data is available from a proximity sensor (indicates an approximated distance between the device and a nearby object). |
dischargingtimechange | Event | Battery status | ThedischargingTime attribute has been updated. |
DOMActivate | UIEvent | DOM L3 | A button, link or state changing element is activated (use click instead). |
DOMAttributeNameChanged | MutationNameEvent | DOM L3Removed | The name of an attribute changed (usemutation observersinstead). |
DOMAttrModified | MutationEvent | DOM L3 | The value of an attribute has been modified (usemutation observersinstead). |
DOMCharacterDataModified | MutationEvent | DOM L3 | A text or anotherCharacterDatahas changed (usemutation observersinstead). |
DOMContentLoaded | Event | HTML5 | The document has finished loading (but not its dependent resources). |
DOMElementNameChanged | MutationNameEvent | DOM L3Removed | The name of an element changed (usemutation observersinstead). |
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 (usemutation observersinstead). |
DOMNodeInsertedIntoDocument | MutationEvent | DOM L3 | A node has been inserted into the document (usemutation observersinstead). |
DOMNodeRemoved | MutationEvent | DOM L3 | A node has been removed from its parent node (usemutation observersinstead). |
DOMNodeRemovedFromDocument | MutationEvent | DOM L3 | A node has been removed from the document (usemutation observersinstead). |
DOMSubtreeModified | MutationEvent | DOM L3 | A change happened in the document (usemutation observersinstead). |
downloading | Event | Offline | The user agent has found an update and is fetching it, or is downloading the resources listed by the cache manifest for the first time. |
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 | Theduration 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 theload() method is called to reload it. |
ended | Event | HTML5 media | Playback has stopped because the end of the media was reached. |
ended | Event | Web Audio API | |
endEvent | TimeEvent | SVG | ASMILanimation element ends. |
error | UIEvent | DOM L3 | A resource failed to load. |
error | ProgressEvent | ProgressandXMLHttpRequest | Progression has failed. |
error | Event | Offline | An error occurred while downloading the cache manifest or updating the content of the application. |
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. |
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. |
hashchange | HashChangeEvent | HTML5 | The fragment identifier of the URL has changed (the part of the URL after the #). |
lostpointercapture | PointerEvent | Pointer Events | |
input | Event | HTML5 | The value of an element changes or the content of an element with the attributecontenteditableis 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 | ||
levelchange | Event | Battery status | Thelevel attribute has been updated. |
load | UIEvent | DOM L3 | A resource and its dependent resources have finished loading. |
load | ProgressEvent | ProgressandXMLHttpRequest | 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 | ProgressandXMLHttpRequest | Progress has stopped (after "error", "abort" or "load" have been dispatched). |
loadstart | ProgressEvent | ProgressandXMLHttpRequest | Progress has begun. |
mark | SpeechSynthesisEvent | Web Speech API | |
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. |
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. |
noupdate | Event | Offline | The manifest hadn't changed. |
obsolete | Event | Offline | The manifest was found to have become a 404 or 410 page, so the application cache is being deleted. |
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 transfered from the system clipboard to the document. |
pause | Event | HTML5 media | Playback has been paused. |
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. |
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 | ProgressandXMLHttpRequest | In progress. |
progress | ProgressEvent | Offline | The user agent is downloading resources listed by the manifest. |
ratechange | Event | HTML5 media | The playback rate has changed. |
readystatechange | Event | HTML5andXMLHttpRequest | The readyState attribute of a document has changed. |
repeatEvent | TimeEvent | SVG | ASMILanimation element is repeated. |
reset | Event | DOM L2,HTML5 | A form is reset. |
resize | UIEvent | DOM L3 | The document view has been resized. |
scroll | UIEvent | DOM L3 | The document view or an element has been scrolled. |
seeked | Event | HTML5 media | Aseekoperation completed. |
seeking | Event | HTML5 media | Aseekoperation began. |
select | UIEvent | DOM L3 | Some text is being selected. |
show | MouseEvent | HTML5 | A contextmenu event was fired on/bubbled to an element that has acontextmenuattribute |
stalled | Event | HTML5 media | The user agent is trying to fetch media data, but data is unexpectedly not forthcoming. |
storage | StorageEvent | Web Storage | A storage area (localStorageorsessionStorage) 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 theSVGwas loaded. |
SVGError | SVGEvent | SVG | An error has occurred before theSVGwas loaded. |
SVGLoad | SVGEvent | SVG | AnSVGdocument has been loaded and parsed. |
SVGResize | SVGEvent | SVG | AnSVGdocument is being resized. |
SVGScroll | SVGEvent | SVG | AnSVGdocument is being scrolled. |
SVGUnload | SVGEvent | SVG | AnSVGdocument has been removed from a window or frame. |
SVGZoom | SVGZoomEvent | SVG | AnSVGdocument is being zoomed. |
timeout | ProgressEvent | XMLHttpRequest | |
timeupdate | Event | HTML5 media | The time indicated by thecurrentTime 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. |
touchenter | TouchEvent | Touch EventsRemoved | A touch point is moved onto the interactive area of an element. |
touchleave | TouchEvent | Touch EventsRemoved | A touch point is moved off the interactive area of an element. |
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 | ACSS transitionhas completed. |
unload | UIEvent | DOM L3 | The document or a dependent resource is being unloaded. |
updateready | Event | Offline | The resources listed in the manifest have been newly redownloaded, and the script can useswapCache() to switch to the new cache. |
upgradeneeded | IndexedDB | An attempt was made to open a database with a version number higher than its current version. Aversionchange transaction has been created. | |
userproximity | SensorEvent | Sensor | Fresh data is available from a proximity sensor (indicates whether the nearby object isnear the device or not). |
versionchange | IndexedDB | Aversionchange 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. |
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 theRIL. | |
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. | |
mozbrowserclose | Firefox OS specific | Sent when window.close() is called within a browser iframe. | |
mozbrowsercontextmenu | Firefox OS specific | Sent when a browser `` try to open a context menu. | |
mozbrowsererror | Firefox OS specific | Sent when an error occured while trying to load a content within a browser iframe | |
mozbrowsericonchange | Firefox OS specific | Sent when the favicon of a browser iframe changes. | |
mozbrowserlocationchange | Firefox OS specific | Sent when an browser iframe's location changes. | |
mozbrowserloadend | Firefox OS specific | Sent when the browser iframe has finished loading all its assets. | |
mozbrowserloadstart | Firefox OS specific | Sent when the browser iframe starts to load a new page. | |
mozbrowseropenwindow | Firefox OS specific | Sent when window.open() is called within a browser iframe. | |
mozbrowsersecuritychange | Firefox OS specific | Sent when the SSL state changes within a browser iframe. | |
mozbrowsershowmodalprompt | Firefox OS specific | Sent when alert() , confirm() or prompt() are called within a browser iframe | |
mozbrowsertitlechange | Firefox OS specific | Sent when the document.title changes within a browser iframe. | |
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. |
onconnectedconnected | 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 withoverflow !=visible ). |
smartcard-insert | Mozilla specific | Asmartcardhas been inserted. | |
smartcard-remove | Mozilla specific | Asmartcardhas been removed. | |
stkcommand | Firefox OS specific | TheSTKProactive Command is issued fromICC. | |
stksessionend | Firefox OS specific | TheSTKSession is terminated byICC. | |
text | Mozilla Specific | A generic composition event occurred. | |
underflow | UIEvent | Mozilla specific | An element is no longer overflowed by its content (only works for elements styled withoverflow !=visible ). |
uploadprogress | ProgressEvent | Mozilla Specific | Upload is in progress (see progress ). |
ussdreceived | Firefox OS specific | A newUSSDmessage is received | |
voicechange | Firefox OS specific | The MozMobileConnection.voice object changes values. |
注意:这些事件不会暴露给 Web 内容使用,只能在 chrome 内容的上下文中使用。
Event Name | Event Type | Specification | Fired when... |
---|---|---|---|
broadcast | XUL | Anobserver noticed a change to the attributes of a watched broadcaster. | |
CheckboxStateChange | XUL | The state of acheckbox 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 acommandset 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 aradio 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 | Ameta element has been added to a document. | |
DOMMetaRemoved | Addons specific | Ameta 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 | Anotification element is shown. | |
AlertClose | Addons specific | Anotification 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 fullscreenmode 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". | |
tabviewsearchenabled | Addons specific | The search feature of Panorama has been activated | |
tabviewsearchdisabled | Addons specific | The search feature of Panorama has been deactivated | |
tabviewframeinitialized | Addons specific | The frame container of Panorama has been initialized | |
tabviewshown | Addons specific | The Panorama tab has been shown | |
tabviewhidden | Addons specific | The Panorama tab has been hidden | |
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. |
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。