W3C home > Mailing lists > Public > public-webapi@w3.org > March 2008

Re: [Bindings] 'new' behavior on interface objects

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 18 Mar 2008 18:14:48 +0100
To: "Travis Leithead" <travil@windows.microsoft.com>, "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <op.t7716ybl64w2qv@annevk-t60.oslo.opera.com>

On Tue, 18 Mar 2008 17:56:17 +0100, Travis Leithead  
<travil@windows.microsoft.com> wrote:
> Since this spec is presumably creating a language binding for  
> JavaScript, (and assuming interface objects are Functions, as seen by  
> Opera), then why does:
>
> var div = new HTMLDivElement();
>
> produce a script error?

Because there's no such constructor defined. There's just an object there  
that gives the ability to prototype it, etc.


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Tuesday, 18 March 2008 17:15:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 18 March 2008 17:15:50 GMT