- From: Cameron McCormack <cam@mcc.id.au>
- Date: Tue, 28 Jun 2011 10:10:54 +1200
- To: Anne van Kesteren <annevk@opera.com>
- Cc: Ian Hickson <ian@hixie.ch>, "www-dom@w3.org" <www-dom@w3.org>
Anne van Kesteren: > Cameron, could you review step four (the step about dictionaries) of > the event constructor algorithm: > > http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-event-constructor > > (It references several terms from Web IDL.) That looks terminologically sound. :-) The only thing that stands out is that there’s a kind of double initialisation happening; for example on CustomEvent it’s stated: The detail attribute must return the value it was initialized to. When an event is created the attribute must be initialized to null. So when step 1 of the event constructor algorithm is run, detail will be initialised to null. Then, when step 4 runs, this will again initialise detail to be whatever value the corresponding dictionary member has. It also seems like it would be superfluous to define in the IDL that the detail dictionary member has a default value of null, while also stating this in the prose. But I guess that might be necessary if createEvent() doesn’t have anything to do with the event constructor. Maybe then it’d be better not to use the default values for the dictionary members, and rely on the initialisation of those members happening due to the prose? -- Cameron McCormack ≝ http://mcc.id.au/
Received on Monday, 27 June 2011 22:11:28 UTC