[Public WebGL] WebGLContextAttributes

Chris Marrin [email protected]
Tue Jan 5 15:22:24 PST 2010

On Jan 5, 2010, at 2:51 PM, Kenneth Russell wrote:

> On Tue, Dec 29, 2009 at 8:59 AM, Kenneth Russell <[email protected]> wrote:
>> On Sat, Dec 26, 2009 at 2:22 PM, Chris Marrin <[email protected]> wrote:
>>> On Dec 23, 2009, at 5:01 PM, Kenneth Russell <[email protected]> wrote:
>>>> On Wed, Dec 23, 2009 at 3:48 PM, Chris Marrin <[email protected]> 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.
>> As Philip pointed out we also need to remove the NameSetter,
>> NameGetter and NameDeleter extended attributes. In other words, rather
>> than trying to specify it as a dictionary, we need to state which
>> attributes the DOM code will look up via callbacks. This is the IDL
>> which will give us the desired result:
>>    [Callback] interface WebGLContextAttributes {
>>        attribute boolean alpha;
>>        attribute boolean depth;
>>        attribute boolean stencil;
>>        attribute boolean antialias;
>>        attribute boolean premultipliedAlpha;
>>    };
> Are there any objections to my updating the specification for
> WebGLContextAttributes?

None from me. In fact, I would appreciate it!

[email protected]

You are currently subscribe to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:

More information about the public_webgl mailing list