- From: Anne van Kesteren <annevk@opera.com>
- Date: Thu, 01 Dec 2011 14:26:05 +0100
- To: public-device-apis@w3.org, "Anssi Kostiainen" <anssi.kostiainen@nokia.com>
On Thu, 01 Dec 2011 12:21:00 +0100, Anssi Kostiainen <anssi.kostiainen@nokia.com> wrote: > When the battery charging state is updated, the user agent must queue a > task which sets the charging attribute's value and fires a simple event > [HTML5] named chargingchange at the BatteryManager object. > > When the battery charging time is updated, the user agent must queue a > task which sets the chargingTime attribute's value and fires a simple > event [HTML5] named chargingtimechange at the BatteryManager object. > > When the battery discharging time is updated, the user agent must queue > a task which sets the dischargingTime attribute's value and fires a > simple event [HTML5] nameddischargingtimechange at the BatteryManager > object. > > When the battery level is updated, the user agent must queue a task > which sets the level attribute's value and fires a simple event [HTML5] > named levelchange at the BatteryManager object. This looks good. You might want state in the terminology section that "queue a task" and "fire a simple event" are defined elsewhere rather than repeat it, but that's up to you. >>>> You also need to actually define the various on* attributes as being >>>> event handlers and update their IDL to match the latest crazy IDL >>>> syntax (which might be simplified, so maybe you want to wait for >>>> that). > > I added the following to the Conformance section: > > [[ > > The Function interface represents a function in the scripting language > being used as defined in [HTML5]. > > ]] > > Would that do the trick? I'm looking for the path of least resistance > here :) To define an event handler you need to have a little more language. See http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#event-handlers for instance. And until we have the fancier lowercase function keyword you need this in your IDL: [TreatNonCallableAsNull] attribute Function? onXXX; Cheers, -- Anne van Kesteren http://annevankesteren.nl/
Received on Thursday, 1 December 2011 13:26:48 UTC