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

Re: [Public WebGL] Should WebGLContextEvent have a constructor?



I have filed bug 550:

<http://www.khronos.org/bugzilla/show_bug.cgi?id=550>

Dominic

On Tue, Nov 8, 2011 at 6:13 PM, Kenneth Russell <kbr@google.com> wrote:
Yes, I think it's appropriate to update the definition of this event
to track that of other events in the HTML spec.

Would you mind filing a bug on http://www.khronos.org/bugzilla/ about
this? Product WebGL, Component Specification. If this is too much work
let me know and I'll do it.

A snapshot of the next version of the WebGL spec is underway and this
might need to wait until after that's done. However this change
shouldn't affect any applications since they shouldn't need to
instantiate these events themselves.

-Ken

On Mon, Nov 7, 2011 at 2:30 PM, Dominic Cooney <dominicc@chromium.org> wrote:
> I notice that many recent drafts of contemporary specs (eg DOM4, HTML5,
> Workers, WebSockets, etc.) specify events as having constructors, and not
> init*Event methods. For example, DOM4 specifies CustomEvent this way:
>
> <http://www.w3.org/TR/domcore/#interface-customevent>
>
> [Constructor(DOMString type, optional CustomEventInit eventInitDict)]
> interface CustomEvent : Event {
> Â readonly attribute any detail;
> };
>
> dictionary CustomEventInit : EventInit {
> Â any detail;
> }
> Would it beÂappropriate to change the definition of WebGLContextEvent from
> this:
>
> interface WebGLContextEvent : Event {
> Â readonly attribute DOMString statusMessage;
>
> Â void initWebGLContextEvent(DOMString typeArg,
> Â Â boolean canBubbleArg,
> Â Â boolean cancelableArg,
> Â Â DOMString statusMessageArg);
> };
> To this:
> [Constructor(DOMString type, optional WebGLContextEventInit eventInitDict)]
> interface WebGLContextEvent : Event {
> Â readonly attribute DOMString statusMessage;
> };
> dictionary WebGLContextEventInit : EventInit {
> Â DOMString statusMessage;
> };
> Dominic