W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2012

Re: [Clipboard API] The before* events

From: Olli Pettay <Olli.Pettay@helsinki.fi>
Date: Fri, 02 Nov 2012 09:06:56 +0100
Message-ID: <50937F20.3060809@helsinki.fi>
To: Glenn Maynard <glenn@zewt.org>
CC: Hallvord Reiar Michaelsen Steen <hallvord@opera.com>, Ojan Vafai <ojan@chromium.org>, Travis Leithead <travis.leithead@microsoft.com>, WebApps WG <public-webapps@w3.org>, Ryosuke Niwa <rniwa@webkit.org>, Aryeh Gregor <ayg@aryeh.name>, Daniel Cheng <dcheng@chromium.org>, Bjoern Hoehrmann <derhoermi@gmx.net>, Sebastian Markbåge <sebastian@calyptus.eu>
On 11/02/2012 12:56 AM, Glenn Maynard wrote:
> On Thu, Nov 1, 2012 at 5:14 PM, Hallvord Reiar Michaelsen Steen <hallvord@opera.com <mailto:hallvord@opera.com>> wrote:
>
>     The most IMHO elegant solution is what we implemented in Opera: we simply keep relevant menu entries enabled if there are event listeners
>     registered for the corresponding event. This sort of goes against the "registering event listeners should not have side effects" rule, but it's a
>     UI effect the page can't detect so I guess it's ok.
>
>
> This doesn't really work when pages put their event listeners further up the tree, eg. capturing listeners on the document and other "event
> delegation" tricks, right?

It should work just fine if you check the whole eventtarget chain (from the target to the window object).


-Olli



>
> --
> Glenn Maynard
>
Received on Friday, 2 November 2012 08:07:44 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:55 GMT