This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25665 - ArrayBufferView should include DataView
Summary: ArrayBufferView should include DataView
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-12 20:46 UTC by contributor
Modified: 2014-05-13 18:13 UTC (History)
7 users (show)

See Also:


Attachments

Description contributor 2014-05-12 20:46:24 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html
Multipage: http://www.whatwg.org/C#dependencies
Complete: http://www.whatwg.org/c#dependencies
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
ArrayBufferView should include DataView

Posted from: 63.245.221.34 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:32.0) Gecko/20100101 Firefox/32.0
Comment 1 Boris Zbarsky 2014-05-12 20:47:30 UTC
http://www.khronos.org/registry/typedarray/specs/latest/#8 implements ArrayBufferView, for example.  And in general, any time you want to allow _any_ typed array, you might as well allow DataView.
Comment 2 Ian 'Hixie' Hickson 2014-05-12 22:21:49 UTC
Surprisingly, this really only requires adding DataView to ArrayBufferView, as far as I can tell.
Comment 3 Boris Zbarsky 2014-05-12 23:36:32 UTC
Yes, exactly.  Or at least that will get things to parity with the existing bits for typed arrays, which don't exactly make much sense yet either.... :(
Comment 4 Kenneth Russell 2014-05-13 00:17:09 UTC
In discussions with the ECMAScript working group, ArrayBufferView as a concept was removed in favor of a type test, ArrayBuffer.isView. http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#april_27_2014_draft_rev_24 specifies this function, and the WebGL conformance suite at https://github.com/KhronosGroup/WebGL  verifies the presence and functionality of ArrayBuffer.isView.

Is the complaint in Comment 3 that https://www.khronos.org/registry/typedarray/specs/latest/ should remove the ArrayBufferView concept? Agree that that should be done in order to achieve parity with the ES6 drafts -- though Khronos' typed array spec hasn't been touched since ES6 subsumed the functionality.
Comment 5 Boris Zbarsky 2014-05-13 00:21:37 UTC
Comment 3 is not a complaint, past the fact that as things stand using "Uint8Array" in IDL has no connection to the ES6 Uint8Array; that's a problem we need to fix in WebIDL.  There's nothing you can do in the Khronos spec to change that.
Comment 6 Ian 'Hixie' Hickson 2014-05-13 18:11:07 UTC
Yeah, the typedef in HTML is a polite fiction until WebIDL is updated to define a way to reference the actual underlying JavaScript concepts. (The Khronos spec is just a historical artefact now.)

Ok, I've added DataView to the typedef.
Comment 7 contributor 2014-05-13 18:13:06 UTC
Checked in as WHATWG revision r8628.
Check-in comment: Allow DataView to be used where ArrayBufferView is mentioned
http://html5.org/tools/web-apps-tracker?from=8627&to=8628