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

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