[Public WebGL] Can getSupportedExtensions return null?

Cedric Vivier [email protected]
Thu Apr 26 16:58:34 PDT 2012

On Thu, Apr 26, 2012 at 19:27, Kenneth Russell <[email protected]> wrote:
>> I'm not sure to remember what was the intent here, but I think adding
>> "Returns a zero-length sequence if the context's webgl context lost
>> flag is set." would be a good idea.
>> It would avoid for some apps to throw at context loss because of this
>> call where they are (logically) expecting an array.
> The intent here was what the IDL specified. The spec has been updated
> to add the "?" in section 5.14.14 "Detecting and enabling extensions".

But... if no extension is supported, getSupportedExtensions returns an
empty sequence isn't it?
The spec seems unclear about this.

Since a lost context does not support any extension, shouldn't it
return an empty array as well?
IMHO we should try to avoid nullables where possible.

I suggest replacing :

sequence<DOMString>? getSupportedExtensions()
Returns an array of all the supported extension strings. Any string in
this list, when passed to getExtension must return a valid object. Any
other string passed to getExtension must return null.

with :

sequence<DOMString> getSupportedExtensions()
Returns an array containing the names of all extensions supported by
the context, or a zero-length array if the context does not support
Any name present in this array must not return null when passed to getExtension.


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

More information about the public_webgl mailing list