W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2011

Re: [DOMCore] Making event initializing easier

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 26 Jun 2011 17:35:46 +0000 (UTC)
To: Anne van Kesteren <annevk@opera.com>
cc: "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <Pine.LNX.4.64.1106261733070.20871@ps20323.dreamhostps.com>
On Sun, 26 Jun 2011, Anne van Kesteren wrote:
> On Sat, 25 Jun 2011 21:07:58 +0200, Ian Hickson <ian@hixie.ch> wrote:
> > On Sat, 25 Jun 2011, Anne van Kesteren wrote:
> > > How would you define
> > > http://dev.w3.org/2006/webapi/progress/#interface-progressevent in a
> > > more simple manner? Defining the mapping for the dictionary is rather
> > > trivial, but I agree that if we can make it more trivial or unnecessary
> > > even, that would be nice.
> > 
> > "The lengthComputable attribute must return the value it was 
> > initialised to. Its default value is false."
> > 
> > Then in the definition of the constructor: "Initialise all attributes 
> > to their default values. For each attribute with name /foo/ in the 
> > dictionary, initialise the attribute on the event with the same name 
> > /foo/ to the value of the attribute on the dictionary."
> > 
> > With a bit more massaging to use the right terms and so on, but that's 
> > the basic idea.
> 
> I guess this could work, but it seems kind of weird that readonly 
> attributes are set this way. That is the reason I instead had them 
> return internal concepts.

Essentially, what I described can be viewed as an "internal concept": it 
defines the attributes as each having an "initialised" value. They're just 
not explicitly named.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 26 June 2011 17:36:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:07 GMT