W3C home > Mailing lists > Public > public-device-apis@w3.org > September 2011

cancelable and bubbles in init*Event

From: Robin Berjon <robin@berjon.com>
Date: Tue, 6 Sep 2011 13:57:26 +0200
Message-Id: <407068A8-99C5-448E-8C13-935FEA5B9CA3@berjon.com>
Cc: public-device-apis@w3.org
To: www-dom@w3.org
Hi www-dom,

as you can see we've been thinking about you quite a lot :)

A question came up as we were discussing our specification of initBatteryStatusEvent() for our Battery Level specification[0]. It may be that that method will actually be dropped, but this issue would apply equally to its replacement.

The battery event is defined in such a way that it is neither cancellable nor bubbling. However, in line with other init*Event methods, options are provided to define synthetic such events as cancellable or bubbling. The question is therefore: what's the right thing to do when either are set to true?

    a) Synthesise an event that bubbles and can be cancelled?
    b) Ignore those and synthesise an event that doesn't?
    b') If (b), should we remove them from the signature?

Thanks in advance for your keen insights!

[0] http://dev.w3.org/2009/dap/system-info/battery-status.html

-- 
Robin Berjon - http://berjon.com/ - @robinberjon
Received on Tuesday, 6 September 2011 11:57:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:22 GMT