W3C home > Mailing lists > Public > public-html@w3.org > August 2007

Re: The canvas element (detailed review)

From: Cameron McCormack <cam@mcc.id.au>
Date: Sun, 5 Aug 2007 10:41:07 +1000
To: public-html@w3.org
Message-ID: <20070805004107.GA17880@arc.mcc.id.au>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:03 GMT