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

2008-03-23 Thread Travis Leithead
Mmm. Good points all. Allowing them to be factory methods is rather interesting. -Original Message- From: Garrett Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 19, 2008 10:23 AM To: Jonas Sicking Cc: Travis Leithead; Web APIs WG (public) Subject: Re: [Bindings] 'new' behavior

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

2008-03-19 Thread liorean
On 18/03/2008, Travis Leithead [EMAIL PROTECTED] 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? Only having heard

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

2008-03-19 Thread Garrett Smith
On Wed, Mar 19, 2008 at 9:12 AM, Jonas Sicking [EMAIL PROTECTED] wrote: Travis Leithead 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

[Bindings] 'new' behavior on interface objects

2008-03-18 Thread Travis Leithead
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? Seems like a perfectly valid thing to do, essentially a shortcut to

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

2008-03-18 Thread Anne van Kesteren
On Tue, 18 Mar 2008 17:56:17 +0100, Travis Leithead [EMAIL PROTECTED] 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?

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

2008-03-18 Thread Cameron McCormack
Travis Leithead: Since this spec is presumably creating a language binding for JavaScript, Yes, since ECMAScript ≈ JavaScript (for some value of JavaScript). (and assuming interface objects are Functions, as seen by Opera), As mentioned in my previous e-mail, I think that assumption is