Javascript - Event compatibility tables

Javascript - Event compatibility tables - Javascript -...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Javascript - Event compatibility tables http://www.quirksmode.org/js/events_compinfo.html 1 of 6 3/11/2008 11:08 PM Event compatibility tables OnthispageIgivea quick overviewofeventsbrowser compatibility. For historical data and ancient browsers see the old Inline events table I created in 2000. It is no longer maintained. Interface events (blur/focus, contextmenu, load, resize, scroll, unload) Mouse events (click, dblclick, mousedown/up, mouseenter/leave, mousemove, mouseover/out) Form events (change, reset, select, submit) Key events (keydown/press/up) Miscellaneous events (abort, error, subtreemodified) See also the key to my compatibility tables. Interfaceevents See also the key to my compatibility tables. Contents of this table Event Explorer 5 Windows Explorer 6 Windows Explorer 5.2 Mac Mozilla 1.75 Safari 1.3 Opera 8 Netscape 4 blur,focus The blur event fires when an element loses focus. The focus event fires when an element gains focus. On a window, these events usually also fire when the window loses or gains focus because another element like a form field or a link gains or loses focus. If the user clicks on a link, the link gains the focus and keeps it until another element gains the focus. Curiously, W3C has never recognized the existence of these events on windows. Test page window yes yes yes buggy yes yes yes window.onfocus = doSomething; In Mozilla hiding and showing the window fires both events three times. Clicking on the window also fires the focus event. If it must work perfectly in Mozilla and you don't care about Netscape 4, use document.body.onfocus. Test page Link element yes yes incom plete incom plete incom plete incom plete no document.links[0].onblur = doSomething; A perfect implementation would allow focusing and blurring both by a click on the link and by TABbing to the link. Opera only supports the click; Mozilla, Safari and Explorer Mac only the TAB. Note that in Safari you explicitly have to switch on tabbing to links in the Advanced preferences panel. Test page Form fields yes yes yes yes incom plete yes yes document.forms[0].elements[1].onblur = doSomething; Safari supports these events only on text elements. contextmenu The contextmenu event fires whenever the user calls up a context menu. Test page document yes yes no yes yes no no document.oncontextmenu = doSomething; Event Explorer 5 Windows Explorer 6 Windows Explorer 5.2 Mac Mozilla 1.75 Safari 1.3 Opera 8 Netscape 4 See section 7B of the book . show page contents show site navigation Buy the book! Webontwikkelaars gezocht! A b o u t R e s o u r c e s B l og s preferences sitemap contact Search Search QuirksMode.org Page last changed 19 months ago
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Javascript - Event compatibility tables http://www.quirksmode.org/js/events_compinfo.html 3/11/2008 11:08 PM Mouseevents load The load event fires when an HTML document has been loaded completely, including all images, and arrays such as document.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

Javascript - Event compatibility tables - Javascript -...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online