-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
N api dataview #14382
N api dataview #14382
Changes from 1 commit
43ec67d
b56c76b
3839165
5fc5ffb
260ad4e
11362b5
b5fcb56
3fdc71e
dcac0ac
afca265
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1334,22 +1334,23 @@ of the ECMAScript Language Specification. | |
|
||
#### *napi_create_dataview* | ||
<!-- YAML | ||
added: v8.0.0 | ||
added: REPLACEME | ||
--> | ||
|
||
```C | ||
napi_status napi_create_dataview(napi_env env, | ||
size_t length, | ||
napi_value arraybuffer, | ||
size_t byte_offset, | ||
napi_value* result) | ||
size_t length, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
napi_value arraybuffer, | ||
size_t byte_offset, | ||
napi_value* result) | ||
|
||
``` | ||
|
||
- `[in] env`: The environment that the API is invoked under. | ||
- `[in] length`: Number of elements in the DataView. | ||
- `[in] arraybuffer`: ArrayBuffer underlying the DataView. | ||
- `[in] byte_offset`: The byte offset within the ArrayBuffer from which to | ||
start projecting the DataVIew. | ||
start projecting the DataView. | ||
- `[out] result`: A `napi_value` representing a JavaScript DataView. | ||
|
||
Returns `napi_ok` if the API succeeded. | ||
|
@@ -1588,31 +1589,31 @@ is managed by the VM | |
|
||
#### *napi_get_dataview_info* | ||
<!-- YAML | ||
added: v8.0.0 | ||
added: REPLACEME | ||
--> | ||
|
||
```C | ||
napi_status napi_get_dataview_info(napi_env env, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comments here |
||
napi_value dataview, | ||
size_t* bytelength, | ||
void** data, | ||
napi_value* arraybuffer, | ||
size_t* byte_offset) | ||
napi_value dataview, | ||
size_t* bytelength, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
void** data, | ||
napi_value* arraybuffer, | ||
size_t* byte_offset) | ||
``` | ||
|
||
- `[in] env`: The environment that the API is invoked under. | ||
- `[in] dataview`: `napi_value` representing the DataView whose | ||
properties to query. | ||
- `[out] length`: Number of elements in the DataView. | ||
properties to query. | ||
- `[out] bytelength`: Number of bytes in the DataView. | ||
- `[out] data`: The data buffer underlying the DataView. | ||
- `[out] arraybuffer`: ArrayBuffer underlying the DataView. | ||
- `[out] byte_offset`: The byte offset within the data buffer from which | ||
to start projecting the DataView. | ||
to start projecting the DataView. | ||
|
||
Returns `napi_ok` if the API succeeded. | ||
|
||
This API returns various properties of a DataView. | ||
|
||
*Warning*: Use caution while using this API since the underlying data buffer | ||
is managed by the VM | ||
|
||
#### *napi_get_value_bool* | ||
<!-- YAML | ||
|
@@ -2087,6 +2088,7 @@ This API checks if the Object passsed in is a typed array. | |
<!-- YAML | ||
added: v8.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. REPLACEME here too please. |
||
--> | ||
|
||
```C | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (ditto) |
||
napi_status napi_is_dataview(napi_env env, napi_value value, bool* result) | ||
``` | ||
|
@@ -2097,7 +2099,7 @@ napi_status napi_is_dataview(napi_env env, napi_value value, bool* result) | |
|
||
Returns `napi_ok` if the API succeeded. | ||
|
||
This API checks if the Object passsed in is a dataview. | ||
This API checks if the Object passsed in is a DataView. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spelling: |
||
|
||
### *napi_strict_equals* | ||
<!-- YAML | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you leave a newline before this?