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

Re: [Public WebGL] Extension interfaces should be [NoInterfaceObject]

This sounds fine to me. The names of the extension objects were chosen
to be easy to recognize in the IDL and also be legal JavaScript
identifiers. Renaming them to something like
WebGLExtensionStandardDerivatives would in my opinion break the ease
of recognition. Hiding them via [NoInterfaceObject] seems reasonable.


On Thu, Oct 11, 2012 at 11:57 AM, Benoit Jacob <bjacob@mozilla.com> wrote:
> Hello,
> Currently, the IDL for extensions speficies interfaces names in a way that
> forces compliant implementations to expose them on the global object. For
> instance:
> interface WEBGL_compressed_texture_atc
> There is a concern about polluting the global object with arbitrarily many
> names that may not even be easy to trace back to WebGL for someone not
> versed in WebGL, for example OES_standard_derivatives.
> WebIDL has a provision for that: the [NoInterfaceObject] attribute. It is
> documented there:
> http://www.w3.org/TR/WebIDL/#NoInterfaceObject
> Do you agree that we should use it here? So we could add arbitrary
> extensions without having to worry about their names polluting the global
> namespace?
> If we agree on this, we should email public-script-coord@w3.org as asked for
> in the above link. That would make WebGL extensions "supplemental
> interfaces". In my limited understanding, the concern here is that
> [NoInterfaceObject] is a ECMAScript-specific feature. I may be missing
> something else though.
> The alternative, I guess, is to rename WebGL extension interfaces to
> something more cleanly namespaced, e.g.:
> OES_standard_derivatives  ->  WebGLExtensionStandardDerivatives
> EXT_texture_filter_anisotropic  ->  WebGLExtensionTextureFilterAnisotropic
> which is FWIW what we do in Mozilla's C++ implementation.
> Cheers,
> Benoit

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