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

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



One note: you can do a test like "myArray instanceof Float32Array" to
determine whether a variable is definitely an instance of a particular
type.

It would be convenient if that worked for all typed arrays via
"myArray instanceof ArrayBufferView", but the abstract superinterface
ArrayBufferView isn't exposed at the JavaScript level, at least not in
either the top of tree Chrome or Firefox builds.

-Ken


On Fri, Jun 29, 2012 at 11:41 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>
> On 6/29/12 2:36 PM, 3dmashup wrote:
>>
>> I can agree your view JavaScript arrays are not the same to Typed
>> arrays. However
>> it would good to have a method to identify that a Typed Arrays is a
>> Typed Array.
>> My current approach to solve this dilemma is a hack and query for a
>> bytelength > = 0 .
>
>
> You may be interested in the thread at
> http://lists.w3.org/Archives/Public/public-script-coord/2012AprJun/0177.html
>
> -Boris
>
>
> -----------------------------------------------------------
> 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
> -----------------------------------------------------------
>

-----------------------------------------------------------
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
-----------------------------------------------------------