Re: The canvas element (detailed review)

Philip Taylor:
> >Languages other than JavaScript (e.g. Java) can have (statically-)typed 
> >null-valued variables, and 
> ><http://dev.w3.org/cvsweb/~checkout~/2006/webapi/Binding4DOM/Overview.html?rev=1.51&content-type=text/html;%20charset=utf-8#es-interface> 
> >suggests null should be accepted as an object-implementing-an-interface, 
> >so I think it's worth being explicit.

Andrew Fedoniouk:
> Beg my pardon but I cannot find where exactly it "suggests null should be
> accepted as an object-implementing-an-interface".

That section describes how ECMAScript values are handled when the IDL
operation is declared to take a value of type “object-implementing-an-
interface”.  It says that if an ECMAScript null value is passed, then
that’s what the function gets.  If some other value, then some coercion
is done to make it an object, and then the object is checked to ensure
it implements the given interface.

(That whole section 4.1 could be a little clearer by be written in terms
of converting ECMAScript values to IDL values and vice-versa.)

I note the problem with overloading and passing “null” further down:

  http://dev.w3.org/cvsweb/~checkout~/2006/webapi/Binding4DOM/Overview.html?rev=1.51&content-type=text/html;%20charset=utf-8#es-operations

-- 
Cameron McCormack, http://mcc.id.au/
 xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

Received on Sunday, 5 August 2007 00:41:16 UTC