Skip to content

APIs for ES6 DataView #202

Closed
Closed

Description

@jasongin

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

Activity

  1. jasongin commented on Mar 27, 2017

    @jasongin
    MemberAuthor
  2. mhdawson commented on Jun 26, 2017

    @mhdawson
    Member
  3. shivanth commented on Jun 29, 2017

    @shivanth

    I'm taking this up :-)

  4. digitalinfinity commented on Jun 29, 2017

    @digitalinfinity
    Contributor

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

  5. digitalinfinity commented on Aug 31, 2017

    @digitalinfinity
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions