Showing posts with label events. Show all posts
Showing posts with label events. Show all posts

Monday, July 19, 2010

w3c browsers fire bubble listeners before capture listeners

In w3c browsers, the event object's eventPhase property may indicate when it is in capture or bubble mode with a 1 or 3, respectively. A value of 2 indicates that the event object is "at" or processing the target node. However, when the eventPhase is 2, the event's mode is fuzzy.

Share/Bookmark

Wednesday, July 14, 2010

Internet Explorer doesn't bubble click events to the window

This is a simple one. I put some sample code on jsbin.com to show how IE doesn't bubble click events to the window, while w3c browsers do. This is important, because I would normally think to use the window as a "global event listener", not the document. Yeah, I learned this one the hard way.


Share/Bookmark

Internet Explorer sanitizes events between nodes

Events are hard in IE. That is just a fact.

I'm not here to gripe about how IE's event object doesn't adhere to standards, nor offers alternatives. Really, I'm not. This is actually a surprising discovery that has less to do with the standard IE/MS diatribe, and more to do with a unique aspect of their event object.

Share/Bookmark