On 2013-03-04 9:53 AM, Boris Zbarsky wrote:
On 3/4/13 9:10 AM, Zack Weinberg wrote:
So I guess the next question is where does one put a capturing event
handler so that it will see *all* events of the relevant type regardless
of which window it was dispatched to or the contents of that window

I don't think such a thing is possible in a world in which
stopImmediatePropagation exists, is it?  As in, if you have two handlers
which both try to (1) see all events and (2) make sure nothing else sees
them, then one of them will lose.

It only needs to be certain of seeing the event despite anything content can do, and despite arbitrarily weird XUL structure. Also, I don't need to prevent anyone else from seeing the event, I just need to make sure that this handler does see it.

(This is in aid of bug 650960, where I'm trying to replace direct C++ invocation of a dialog box with an indirection through an event, making it easier to replace the dialog box with a better UX later. For that, it might be more convenient in the long term if bubble-phase semantics applied within the chrome, so that a tab-level handler _could_ swallow an event and present tab-scoped UX, but if there was no tab, the global backstop would still apply. But that might be more complicated than I care to get into right now.)

zw
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to