Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APIs for ES6 DataView #202

Closed
jasongin opened this issue Mar 27, 2017 · 5 comments
Closed

APIs for ES6 DataView #202

jasongin opened this issue Mar 27, 2017 · 5 comments

Comments

@jasongin
Copy link
Member

N-API currently has APIs for ArrayBuffer and TypedArray classes, but not the DataView class. The DataView class is specified by ES6 as another kind of view over an ArrayBuffer.

While it could be possible to extend (and rename?) napi_create_typedarray() and napi_get_typedarray_info() to also support DataView objects, I think the combination would be too confusing, because a DataView doesn't have a type, and measures length in terms of bytes instead of elements. So, probably there should be separate APIs:

  • napi_is_dataview()
  • napi_create_dataview()
  • napi_get_dataview_info()
@jasongin
Copy link
Member Author

Related to nodejs/node#11975 (comment)

@mhdawson
Copy link
Member

nodejs/node#13926

@shivanth
Copy link

I'm taking this up :-)

@digitalinfinity
Copy link
Contributor

@shivanth thanks- might want to comment on nodejs/node#13926 so that people there know 😄

@digitalinfinity
Copy link
Contributor

Landed in nodejs/node#14382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants