[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] WebGLContextAttributes




On Dec 23, 2009, at 5:01 PM, Kenneth Russell <kbr@google.com> wrote:

On Wed, Dec 23, 2009 at 3:48 PM, Chris Marrin <cmarrin@apple.com> wrote:

I believe we did say we would allow a JS object literal to be used. That's why WebGLContextAttributes doesn't have a constructor.

This is my recollection as well, and it's also the reason the NameGetter and NameSetter extended attributes were used. However we didn't realize that this would prevent object literals from being passed for this argument.

So is this just a matter of adding [callback] to the interface definition? Of so then we should certainly do that. Otherwise there's nothing to prevent us from allowing an Object literal from being passed and converting it to a WebGLContextAttributes in the binding. If WebIDL can't describe that we can add it explicitly to the spec.



Speaking of which, someone mentioned that we should be using the "editor's draft" of the WebIDL spec. But I can't find such a thing. Seems like WebIDL should be able to describe generic containers (Objects), since it can (at last viewing) supports sequences (Arrays).

It's what Philip pointed to above:

http://dev.w3.org/2006/webapi/WebIDL/


Ah. That was confusing since the URL has 2006 in it. Also when you search for "webidl spec" you get the one from 2008. We should add a link to the proper webidl spec to ours.


----------------------------------------------------------- You are currently subscribe to public_webgl@khronos.org. To unsubscribe, send an email to majordomo@khronos.org with the following command in the body of your email: