Re: Some DOM related comments

On 02/06/07, Cameron McCormack <> wrote:
> I've been doing some similar tests recently on the ECMAScript bindings,
> which I just now posted to the webapi list:

I'll check that out.

> liorean:
> > In 1.3.1: I think the issues related to prototype delegation have to
> > be addressed. More specifically:
> Yes I think all of these things should be specified.  I'm meant to be
> editing the Bindings4DOM spec for the Web API group, which will define
> these things in some general manner.  Hopefully then HTML5 can reference
> that spec and then mention any peculiarities required for web browsers.

Nice, I haven't paid enough attention to WebAPI it seems.

> > Finally: (Pretty sure this is not the realm of the HTML WG, but I'll
> > mention it anyway.)
> Agreed.  The Bindings4DOM spec should provide some easy way to reference
> such behaviour (nullable, convertable from different types and in what
> ways, etc.).

Ah. When you mention it, I recall seeing there were the beginnings for
such a spec on the CVS, but it looked rather inactive having last been
modified in 2006-05-01.

 > > I'm of the opinion that if the error lies in the ECMAScript code
> > passing the wrong type, that should always be defined to result in a
> > certain DOMException being thrown and never result in an uncaught
> > implementation specific exception, nor should which exception is
> > appropriate be left uncertain.
> I agree that which exception is thrown should be specified.  Do you
> think it's inappropriate to use a TypeError exception rather than
> defining a DOMException for these errors where a value of the wrong type
> is used?

Not inappropriate at all, I think the ECMAScript NativeError objects
are preferable for any error as long as it does not break consistency
with the DOM specs. I suggested a DOMException since I thought other
consumers of the DOM than ECMAScript may want the same late handling
of type errors.
David "liorean" Andersson

Received on Saturday, 2 June 2007 07:54:25 UTC