[whatwg] WebIDL nested interfaces
Tobie Langel
tobie.langel at gmail.com
Mon Sep 10 16:09:21 PDT 2012
On Tue, Sep 11, 2012 at 12:52 AM, Glenn Maynard <glenn at zewt.org> wrote:
> On Mon, Sep 10, 2012 at 5:39 PM, Tobie Langel <tobie.langel at gmail.com>
> wrote:
>>
>> > It's too late; WebGL is a shipping, widely-used API. (This isn't a
>> > WebGL
>> > problem, either; it's just doing what every other API on the platform
>> > does.
>> > I don't think WebIDL even has a mechanism to put interfaces inside
>> > other
>> > objects.)
>>
>> Really? Wouldn't this do the trick:
>>
>> interface WebGLActiveInfo {
>> readonly attribute GLint size;
>> readonly attribute GLenum type;
>> readonly attribute DOMString name;
>> };
>>
>> interface WebGLGlobal {
>> attribute WebGLActiveInfo activeInfo;
>> };
>>
>> partial interface Window {
>> attribute WebGLGlobal WebGL;
>> };
>
>
> This is just creating a global object "WebGL" containing an object using the
> WebGLActiveInfo interface. It's not moving the WebGLActiveInfo interface
> itself into an object. It sounds like you want something like
>
> interface WebGL {
> interface WebGLActiveInfo {
> ...
> }
> }
>
> interface WebGLRenderingContext {
> WebGL.WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint
> index);
> }
No. It sounds like I should be fast asleep instead of making a fool of
myself and wasting everybody's time.
Sorry folks.
--tobie
More information about the whatwg
mailing list