W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2012

Re: [Public WebGL] Should WebGLContextAttributes be a callback interface?

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 09 Apr 2012 12:35:24 +1000
Message-ID: <4F824AEC.1060102@mcc.id.au>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: Kenneth Russell <kbr@google.com>, Glenn Maynard <glenn@zewt.org>, public_webgl@khronos.org, "public-script-coord@w3.org" <public-script-coord@w3.org>
Boris Zbarsky:
> Hmm.  Why not?  There's definitely nothing in the spec about that, and
> it's not clear to me why one couldn't have a function returning an
> instance of a callback interface in general....

(I added something in the time between my mail and yours...)

> (Not that I have an objection to using dictionaries here, I don't think;
> just trying to understand the overall implications.)

Well, callback interfaces are meant to be for JS to provide a bunch of 
callback-like properties and functions.  I suppose it's not out of the 
question to allow it to be returned from an operation.  And it would be 
consistent with being able to return a callback function type.

Would a DOM object be able to create and return its own objects that 
implement callback interfaces?  I think that blurs the lines between 
callback and non-callback interfaces.  But we could allow it to return a 
reference to an existing callback interface object that script created 
and passed in.
Received on Monday, 9 April 2012 02:36:02 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC