- From: Garrett Smith <dhtmlkitchen@gmail.com>
- Date: Sun, 10 Oct 2010 20:21:06 -0700
- To: Simon Pieters <simonp@opera.com>, Garrett Smith <dhtmlkitchen@gmail.com>, "Mark S. Miller" <erights@google.com>, Maciej Stachowiak <mjs@apple.com>, James Graham <jgraham@opera.com>, Travis Leithead <travil@microsoft.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>, annevk@opera.com
On 10/10/10, Cameron McCormack <cam@mcc.id.au> wrote: > Cameron McCormack: >> 2. Allow all constructors to be called as functions and have the same >> behaviour. >> >> I’ll make the spec do (2). > > So done: > > http://dev.w3.org/2006/webapi/WebIDL/#es-interface-call > http://dev.w3.org/2006/webapi/WebIDL/#named-constructors > | A named constructor object that exists due to one or more | [NamedConstructor] extended attributes with a given identifier | is a function object. It MUST have a [[Call]] internal property, | allows construction of objects that implement the interface on | which the [NamedConstructor] extended attributes appear. Again, it is redundant to state that a function object has a [[Call]] property. It is also redundant to say that the function is an object. Functions are objects. Change every occurrence of "named constructor object" to "named constructor". I suggest rewording that. [NamedConstructor] function When a named constructor is called as a function, it creates and initializes a new object of the interface type. Question: Do you have any real examples of a NamedConstructor? And if so, please provide one. TIA. -- Garrett
Received on Monday, 11 October 2010 03:21:38 UTC