Closed
Description
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()
Metadata
Metadata
Assignees
Labels
No labels