Javascript - Event compatibility tables

Javascript - Event compatibility tables - Javascript Event...

Info icon This 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 On this page I give a quick overview of events browser 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. Interface events 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 o g s preferences sitemap contact Search Search QuirksMode.org Page last changed 19 months ago
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern