W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2011

Re: Non-constructible constructors and Arrays

From: Anne van Kesteren <annevk@opera.com>
Date: Fri, 09 Sep 2011 11:00:17 +0200
To: "Cameron McCormack" <cam@mcc.id.au>, "Alex Russell" <slightlyoff@google.com>
Cc: public-script-coord@w3.org, "Brendan Eich" <brendan@mozilla.com>
Message-ID: <op.v1i9yri564w2qv@g239.guest-int.opera.com>
On Fri, 09 Sep 2011 10:24:18 +0200, Alex Russell <slightlyoff@google.com>  
wrote:
> On Fri, Sep 9, 2011 at 1:14 AM, Cameron McCormack <cam@mcc.id.au> wrote:
>>  Specification writers need to write the actual behaviour for these
>> constructors whether they are implicitly declared or not.
>
> The default behavior would simply be to generate objects of those
> types without side effects. E.g., without a smarter ctor that accepts
> arguments, new HTMLDivElement() == document.createElement("div").

Without a definition for new HTMLDivElement() that would not be true. E.g.  
http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-node-document  
would be undefined which would be quite wrong for Element nodes.


> Not sure why that's a bad thing. Yes, HTML DOM can (and should!) do
> something smarter, but this is clearly a step in the right direction.

Why don't you make proposals for how existing specifications ought to  
change?

As I said before, just saying everything can be constructed will just lead  
to a messy situation.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Friday, 9 September 2011 09:01:07 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:04 UTC