@@ -1016,8 +1016,7 @@ typedef enum {
1016
1016
1017
1017
This represents the underlying binary scalar datatype of the TypedArray.
1018
1018
Elements of this enum correspond to
1019
- [Section 22.2](https://tc39.github.io/ecma262/#sec-typedarray-objects)
1020
- of the [ECMAScript Language Specification][].
1019
+ [Section 22.2][] of the [ECMAScript Language Specification][].
1021
1020
1022
1021
### Object Creation Functions
1023
1022
#### napi_create_array
@@ -1035,8 +1034,7 @@ Returns `napi_ok` if the API succeeded.
1035
1034
1036
1035
This API returns an N-API value corresponding to a JavaScript Array type.
1037
1036
JavaScript arrays are described in
1038
- [Section 22.1](https://tc39.github.io/ecma262/#sec-array-objects) of the
1039
- ECMAScript Language Specification.
1037
+ [Section 22.1][] of the ECMAScript Language Specification.
1040
1038
1041
1039
#### napi_create_array_with_length
1042
1040
<!-- YAML
@@ -1064,8 +1062,7 @@ directly read and/or written via C, consider using
1064
1062
[`napi_create_external_arraybuffer`][].
1065
1063
1066
1064
JavaScript arrays are described in
1067
- [Section 22.1](https://tc39.github.io/ecma262/#sec-array-objects) of the
1068
- ECMAScript Language Specification.
1065
+ [Section 22.1][] of the ECMAScript Language Specification.
1069
1066
1070
1067
#### napi_create_arraybuffer
1071
1068
<!-- YAML
@@ -1096,8 +1093,7 @@ written to directly from native code. To write to this buffer from JavaScript,
1096
1093
a typed array or DataView object would need to be created.
1097
1094
1098
1095
JavaScript ArrayBuffer objects are described in
1099
- [Section 24.1](https://tc39.github.io/ecma262/#sec-arraybuffer-objects)
1100
- of the ECMAScript Language Specification.
1096
+ [Section 24.1][] of the ECMAScript Language Specification.
1101
1097
1102
1098
#### napi_create_buffer
1103
1099
<!-- YAML
@@ -1209,8 +1205,7 @@ managed. The caller must ensure that the byte buffer remains valid until the
1209
1205
finalize callback is called.
1210
1206
1211
1207
JavaScript ArrayBuffers are described in
1212
- [Section 24.1](https://tc39.github.io/ecma262/#sec-arraybuffer-objects)
1213
- of the ECMAScript Language Specification.
1208
+ [Section 24.1][] of the ECMAScript Language Specification.
1214
1209
1215
1210
#### napi_create_external_buffer
1216
1211
<!-- YAML
@@ -1351,8 +1346,7 @@ be <= the size in bytes of the array passed in. If not, a RangeError exception i
1351
1346
raised.
1352
1347
1353
1348
JavaScript TypedArray Objects are described in
1354
- [Section 22.2](https://tc39.github.io/ecma262/#sec-typedarray-objects)
1355
- of the ECMAScript Language Specification.
1349
+ [Section 22.2][] of the ECMAScript Language Specification.
1356
1350
1357
1351
1358
1352
#### napi_create_dataview
@@ -1407,8 +1401,7 @@ This API is used to convert from the C `int32_t` type to the JavaScript
1407
1401
Number type.
1408
1402
1409
1403
The JavaScript Number type is described in
1410
- [Section 6.1.6](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type)
1411
- of the ECMAScript Language Specification.
1404
+ [Section 6.1.6][] of the ECMAScript Language Specification.
1412
1405
1413
1406
#### napi_create_uint32
1414
1407
<!-- YAML
@@ -1428,8 +1421,7 @@ This API is used to convert from the C `uint32_t` type to the JavaScript
1428
1421
Number type.
1429
1422
1430
1423
The JavaScript Number type is described in
1431
- [Section 6.1.6](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type)
1432
- of the ECMAScript Language Specification.
1424
+ [Section 6.1.6][] of the ECMAScript Language Specification.
1433
1425
1434
1426
#### napi_create_int64
1435
1427
<!-- YAML
@@ -1448,8 +1440,7 @@ Returns `napi_ok` if the API succeeded.
1448
1440
This API is used to convert from the C `int64_t` type to the JavaScript
1449
1441
Number type.
1450
1442
1451
- The JavaScript Number type is described in
1452
- [Section 6.1.6](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type)
1443
+ The JavaScript Number type is described in [Section 6.1.6][]
1453
1444
of the ECMAScript Language Specification. Note the complete range of `int64_t`
1454
1445
cannot be represented with full precision in JavaScript. Integer values
1455
1446
outside the range of
@@ -1476,8 +1467,7 @@ This API is used to convert from the C `double` type to the JavaScript
1476
1467
Number type.
1477
1468
1478
1469
The JavaScript Number type is described in
1479
- [Section 6.1.6](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type)
1480
- of the ECMAScript Language Specification.
1470
+ [Section 6.1.6][] of the ECMAScript Language Specification.
1481
1471
1482
1472
#### napi_create_string_latin1
1483
1473
<!-- YAML
@@ -1501,8 +1491,7 @@ Returns `napi_ok` if the API succeeded.
1501
1491
This API creates a JavaScript String object from a ISO-8859-1-encoded C string.
1502
1492
1503
1493
The JavaScript String type is described in
1504
- [Section 6.1.4](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type)
1505
- of the ECMAScript Language Specification.
1494
+ [Section 6.1.4][] of the ECMAScript Language Specification.
1506
1495
1507
1496
#### napi_create_string_utf16
1508
1497
<!-- YAML
@@ -1526,8 +1515,7 @@ Returns `napi_ok` if the API succeeded.
1526
1515
This API creates a JavaScript String object from a UTF16-LE-encoded C string
1527
1516
1528
1517
The JavaScript String type is described in
1529
- [Section 6.1.4](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type)
1530
- of the ECMAScript Language Specification.
1518
+ [Section 6.1.4][] of the ECMAScript Language Specification.
1531
1519
1532
1520
#### napi_create_string_utf8
1533
1521
<!-- YAML
@@ -1551,8 +1539,7 @@ Returns `napi_ok` if the API succeeded.
1551
1539
This API creates a JavaScript String object from a UTF8-encoded C string
1552
1540
1553
1541
The JavaScript String type is described in
1554
- [Section 6.1.4](https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type)
1555
- of the ECMAScript Language Specification.
1542
+ [Section 6.1.4][] of the ECMAScript Language Specification.
1556
1543
1557
1544
### Functions to convert from N-API to C types
1558
1545
#### napi_get_array_length
@@ -1981,7 +1968,7 @@ This API returns the Undefined object.
1981
1968
N-API exposes a set of APIs to perform some abstract operations on JavaScript
1982
1969
values. Some of these operations are documented under
1983
1970
[Section 7](https://tc39.github.io/ecma262/#sec-abstract-operations)
1984
- of the [ECMAScript Language Specification](https://tc39.github.io/ecma262/) .
1971
+ of the [ECMAScript Language Specification][] .
1985
1972
1986
1973
These APIs support doing one of the following:
1987
1974
1. Coerce JavaScript values to specific JavaScript types (such as Number or
@@ -2249,7 +2236,7 @@ of the ECMAScript Language Specification.
2249
2236
N-API exposes a set of APIs to get and set properties on JavaScript
2250
2237
objects. Some of these types are documented under
2251
2238
[Section 7](https://tc39.github.io/ecma262/#sec-operations-on-objects) of the
2252
- [ECMAScript Language Specification](https://tc39.github.io/ecma262/) .
2239
+ [ECMAScript Language Specification][] .
2253
2240
2254
2241
Properties in JavaScript are represented as a tuple of a key and a value.
2255
2242
Fundamentally, all property keys in N-API can be represented in one of the
@@ -2391,19 +2378,17 @@ typedef enum {
2391
2378
2392
2379
`napi_property_attributes` are flags used to control the behavior of properties
2393
2380
set on a JavaScript object. Other than `napi_static` they correspond to the
2394
- attributes listed in [Section 6.1.7.1](https://tc39.github.io/ecma262/#table-2)
2395
- of the [ECMAScript Language Specification](https://tc39.github.io/ecma262/) .
2381
+ attributes listed in [Section 6.1.7.1][]
2382
+ of the [ECMAScript Language Specification][] .
2396
2383
They can be one or more of the following bitflags:
2397
2384
2398
2385
- `napi_default` - Used to indicate that no explicit attributes are set on the
2399
2386
given property. By default, a property is read only, not enumerable and not
2400
2387
configurable.
2401
2388
- `napi_writable` - Used to indicate that a given property is writable.
2402
2389
- `napi_enumerable` - Used to indicate that a given property is enumerable.
2403
- - `napi_configurable` - Used to indicate that a given property is
2404
- configurable, as defined in
2405
- [Section 6.1.7.1](https://tc39.github.io/ecma262/#table-2) of the
2406
- [ECMAScript Language Specification](https://tc39.github.io/ecma262/).
2390
+ - `napi_configurable` - Used to indicate that a given property is configurable,
2391
+ as defined in [Section 6.1.7.1][] of the [ECMAScript Language Specification][].
2407
2392
- `napi_static` - Used to indicate that the property will be defined as
2408
2393
a static property on a class as opposed to an instance property, which is the
2409
2394
default. This is used only by [`napi_define_class`][]. It is ignored by
@@ -3716,8 +3701,14 @@ NAPI_EXTERN napi_status napi_get_uv_event_loop(napi_env env,
3716
3701
[Object Lifetime Management]: #n_api_object_lifetime_management
3717
3702
[Object Wrap]: #n_api_object_wrap
3718
3703
[Script Execution]: #n_api_script_execution
3704
+ [Section 6.1.4]: https://tc39.github.io/ecma262/#sec-ecmascript-language-types-string-type
3705
+ [Section 6.1.6]: https://tc39.github.io/ecma262/#sec-ecmascript-language-types-number-type
3706
+ [Section 6.1.7.1]: https://tc39.github.io/ecma262/#table-2
3719
3707
[Section 9.1.6]: https://tc39.github.io/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-defineownproperty-p-desc
3720
3708
[Section 12.5.5]: https://tc39.github.io/ecma262/#sec-typeof-operator
3709
+ [Section 22.1]: https://tc39.github.io/ecma262/#sec-array-objects
3710
+ [Section 22.2]: https://tc39.github.io/ecma262/#sec-typedarray-objects
3711
+ [Section 24.1]: https://tc39.github.io/ecma262/#sec-arraybuffer-objects
3721
3712
[Section 24.3]: https://tc39.github.io/ecma262/#sec-dataview-objects
3722
3713
[Section 25.4]: https://tc39.github.io/ecma262/#sec-promise-objects
3723
3714
[Working with JavaScript Functions]: #n_api_working_with_javascript_functions
0 commit comments