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

Re: [Public WebGL] Do Typed Array need an isArray method?

On 6/29/12 3:12 PM, Kenneth Russell wrote:
How does this work for DOM nodes?

Which "this"? If I have a HTML <body> element, then its proto chain is HTMLBodyElement.prototype -> HTMLElement.prototype -> Element.prototype -> Node.prototype (and then possibly to EventTarget.prototype, depending on which version of which spec you read). And all those interface objects exist and can be used as the RHS of instanceof.

For what it's worth, at least some of the SpiderMonkey people I just talked to about don't want to do this for typed arrays at all. They were proposing something more like this IDL:

  interface ArrayBufferView {
    // stuff

  interface Int32Array {
    // stuff

  Int32Array implements ArrayBufferView;

That would, of course, keep "instanceof ArrayBufferView" not working....

Personally, I'm planning to stay out of this whole discussion as much as I can; I don't actually care which way we go here as long as the end state involves the spec and the implementations actually agreeing and a test suite. ;)


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