Update the webpage (#3902)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
@@ -10,7 +10,7 @@ permalink: /getting-started/
|
|||||||
|
|
||||||
## Setting up prerequisites
|
## Setting up prerequisites
|
||||||
|
|
||||||
Currently, only Ubuntu 14.04+ is officially supported as primary development environment.
|
Currently, only Ubuntu 18.04+ is officially supported as primary development environment.
|
||||||
|
|
||||||
There are several dependencies, that should be installed manually. The following list is the absolute minimum for building:
|
There are several dependencies, that should be installed manually. The following list is the absolute minimum for building:
|
||||||
|
|
||||||
@@ -61,10 +61,10 @@ tools/build.py --debug --logging=on --error-messages=on --line-info=on
|
|||||||
python tools/build.py --cmake-param=CMAKE_PARAM
|
python tools/build.py --cmake-param=CMAKE_PARAM
|
||||||
```
|
```
|
||||||
|
|
||||||
**Set a profile mode (ES5.1, subset of ES2015, minimal)**
|
**Set a profile mode (ES.next, ES5.1, minimal)**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python tools/build.py --profile=es5.1|es2015-subset|minimal
|
python tools/build.py --profile=es.next|es5.1|minimal
|
||||||
```
|
```
|
||||||
|
|
||||||
See also the related [README.md](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).
|
See also the related [README.md](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).
|
||||||
|
|||||||
+1
-1
@@ -51,7 +51,7 @@ that can be used by the debugger to identify the currently executed source conte
|
|||||||
### Profiles
|
### Profiles
|
||||||
|
|
||||||
This option can be used to enable/disable available JavaScript language features by providing profile files. Profile files contain a list of C definitions that configure each individual feature.
|
This option can be used to enable/disable available JavaScript language features by providing profile files. Profile files contain a list of C definitions that configure each individual feature.
|
||||||
The `path` value for CMake and Python arguments should be a file path to the profile file, or one of `es2015-subset`, `es5.1`, or `minimal`, which are the pre-defined profiles.
|
The `path` value for CMake and Python arguments should be a file path to the profile file, or one of `es.next`, `es5.1`, or `minimal`, which are the pre-defined profiles.
|
||||||
To see how a profile file should be created, or what configuration options are available in C, see the profile [README](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).
|
To see how a profile file should be created, or what configuration options are available in C, see the profile [README](https://github.com/jerryscript-project/jerryscript/blob/master/jerry-core/profiles/README.md).
|
||||||
|
|
||||||
| Options | |
|
| Options | |
|
||||||
|
|||||||
+46
-44
@@ -1469,10 +1469,10 @@ jerry_value_is_array (const jerry_value_t value)
|
|||||||
Returns whether the given `jerry_value_t` is an ArrayBuffer object.
|
Returns whether the given `jerry_value_t` is an ArrayBuffer object.
|
||||||
|
|
||||||
*Notes*:
|
*Notes*:
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
|
|
||||||
@@ -1594,10 +1594,10 @@ jerry_value_is_constructor (const jerry_value_t value)
|
|||||||
Returns whether the given `jerry_value_t` is a DataView object value.
|
Returns whether the given `jerry_value_t` is a DataView object value.
|
||||||
|
|
||||||
*Notes*:
|
*Notes*:
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_DATAVIEW`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_DATAVIEW`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_DATAVIEW` feature enum value,
|
in runtime with the `JERRY_FEATURE_DATAVIEW` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
|
|
||||||
@@ -1851,10 +1851,10 @@ jerry_value_is_object (const jerry_value_t value)
|
|||||||
Returns whether the given `jerry_value_t` is a promise value.
|
Returns whether the given `jerry_value_t` is a promise value.
|
||||||
|
|
||||||
*Notes*:
|
*Notes*:
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROMISE`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
@@ -1900,10 +1900,10 @@ jerry_value_is_promise (const jerry_value_t value)
|
|||||||
Returns whether the given `jerry_value_t` is a proxy value.
|
Returns whether the given `jerry_value_t` is a proxy value.
|
||||||
|
|
||||||
*Notes*:
|
*Notes*:
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROXY`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_PROXY`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_PROXY` feature enum value,
|
in runtime with the `JERRY_FEATURE_PROXY` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
@@ -1920,7 +1920,7 @@ jerry_value_is_proxy (const jerry_value_t value)
|
|||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
*New in version [next_version]*.
|
*New in version 2.3*.
|
||||||
|
|
||||||
```c
|
```c
|
||||||
{
|
{
|
||||||
@@ -1988,10 +1988,10 @@ jerry_value_is_string (const jerry_value_t value)
|
|||||||
Returns whether the given `jerry_value_t` is a symbol value.
|
Returns whether the given `jerry_value_t` is a symbol value.
|
||||||
|
|
||||||
*Notes*:
|
*Notes*:
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_SYMBOL`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
|
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
|
|
||||||
@@ -2048,10 +2048,10 @@ main (void)
|
|||||||
Checks whether the given `jerry_value_t` is a TypedArray object or not.
|
Checks whether the given `jerry_value_t` is a TypedArray object or not.
|
||||||
|
|
||||||
*Notes*:
|
*Notes*:
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
|
|
||||||
@@ -2106,11 +2106,11 @@ main (void)
|
|||||||
Checks whether the given `jerry_value_t` is the given `jerry_container_type_t` type container object.
|
Checks whether the given `jerry_value_t` is the given `jerry_container_type_t` type container object.
|
||||||
|
|
||||||
*Notes*
|
*Notes*
|
||||||
- This API function depends on a build option (`JERRY_ES2015_BUILTIN_CONTAINER`) and can be checked
|
- This API function depends on a build option (`JERRY_BUILTIN_CONTAINER`) and can be checked
|
||||||
runtime with the `JERRY_FEATURE_MAP, JERRY_FEATURE_SET, JERRY_FEATURE_WEAKMAP, JERRY_FEATURE_WEAKSET`
|
runtime with the `JERRY_FEATURE_MAP, JERRY_FEATURE_SET, JERRY_FEATURE_WEAKMAP, JERRY_FEATURE_WEAKSET`
|
||||||
feature enum values.
|
feature enum values.
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
*New in version 2.3*.
|
*New in version 2.3*.
|
||||||
|
|
||||||
@@ -3386,7 +3386,7 @@ jerry_value_to_string (const jerry_value_t value);
|
|||||||
|
|
||||||
# Functions for promise objects
|
# Functions for promise objects
|
||||||
|
|
||||||
These APIs all depend on the ES2015-subset profile (or on some build options).
|
These APIs all depend on the es.next profile (or on some build options).
|
||||||
|
|
||||||
## jerry_get_promise_result
|
## jerry_get_promise_result
|
||||||
|
|
||||||
@@ -3397,10 +3397,10 @@ The function returns the result of a Promise object.
|
|||||||
*Notes*:
|
*Notes*:
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||||
is no longer needed.
|
is no longer needed.
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROMISE`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
@@ -3464,10 +3464,10 @@ example (void)
|
|||||||
*Notes*:
|
*Notes*:
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||||
is no longer needed.
|
is no longer needed.
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROMISE`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
@@ -3535,10 +3535,10 @@ Resolve or reject the promise with an argument.
|
|||||||
*Note*:
|
*Note*:
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||||
is no longer needed.
|
is no longer needed.
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_PROMISE`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_PROMISE`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
in runtime with the `JERRY_FEATURE_PROMISE` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
@@ -3592,7 +3592,7 @@ jerry_resolve_or_reject_promise (jerry_value_t promise,
|
|||||||
|
|
||||||
# Functions for symbols
|
# Functions for symbols
|
||||||
|
|
||||||
These APIs all depend on the ES2015-subset profile (or on build options).
|
These APIs all depend on the es.next profile (or on build options).
|
||||||
|
|
||||||
## jerry_get_symbol_descriptive_string
|
## jerry_get_symbol_descriptive_string
|
||||||
|
|
||||||
@@ -3604,10 +3604,10 @@ Based on ECMA 262 v6 19.4.3.2.1 this is in the form of `Symbol(<description>)`.
|
|||||||
*Notes*:
|
*Notes*:
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||||
is no longer needed.
|
is no longer needed.
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_SYMBOL`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_SYMBOL`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
|
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
- If the symbol support is not enabled an error will be returned.
|
- If the symbol support is not enabled an error will be returned.
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
@@ -3777,7 +3777,7 @@ jerry_create_array (uint32_t size);
|
|||||||
Create a jerry_value_t representing an ArrayBuffer object.
|
Create a jerry_value_t representing an ArrayBuffer object.
|
||||||
|
|
||||||
*Note*:
|
*Note*:
|
||||||
- This API depends on the ES2015-subset profile.
|
- This API depends on the es.next profile.
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
|
|
||||||
@@ -3825,7 +3825,7 @@ After the object is not needed the GC will call the `free_cb`
|
|||||||
so the user can release the buffer which was provided.
|
so the user can release the buffer which was provided.
|
||||||
|
|
||||||
*Note*:
|
*Note*:
|
||||||
- This API depends on the ES2015-subset profile.
|
- This API depends on the es.next profile.
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
|
|
||||||
@@ -3998,7 +3998,7 @@ jerry_create_error_sz (jerry_error_t error_type,
|
|||||||
Create new JavaScript DataView object.
|
Create new JavaScript DataView object.
|
||||||
|
|
||||||
*Note*:
|
*Note*:
|
||||||
- This API depends on the ES2015-subset profile.
|
- This API depends on the es.next profile.
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
|
|
||||||
@@ -4314,7 +4314,7 @@ Create an empty promise object which can be resolved or rejected later
|
|||||||
by calling jerry_resolve_or_reject_promise.
|
by calling jerry_resolve_or_reject_promise.
|
||||||
|
|
||||||
*Note*:
|
*Note*:
|
||||||
- This API depends on the ES2015-subset profile.
|
- This API depends on the es.next profile.
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
|
|
||||||
@@ -4354,7 +4354,7 @@ jerry_create_promise (void)
|
|||||||
Create a new Proxy object with the given target and handler.
|
Create a new Proxy object with the given target and handler.
|
||||||
|
|
||||||
*Note*:
|
*Note*:
|
||||||
- This API depends on the ES2015-subset profile.
|
- This API depends on the es.next profile.
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
|
|
||||||
@@ -4373,7 +4373,7 @@ jerry_create_proxy (const jerry_value_t target,
|
|||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
*New in version [next_version]*.
|
*New in version 2.3*.
|
||||||
|
|
||||||
[doctest]: # ()
|
[doctest]: # ()
|
||||||
|
|
||||||
@@ -4582,7 +4582,7 @@ Create symbol from an API value.
|
|||||||
|
|
||||||
*Note*:
|
*Note*:
|
||||||
- The given argument is converted to string. This operation can throw an error.
|
- The given argument is converted to string. This operation can throw an error.
|
||||||
- This API depends on the ES2015-subset profile.
|
- This API depends on the es.next profile.
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
|
|
||||||
@@ -4724,10 +4724,10 @@ and element count can be specified.
|
|||||||
*Notes*:
|
*Notes*:
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
|
|
||||||
@@ -4780,10 +4780,10 @@ one of the allowed TypedArray functions.
|
|||||||
*Notes*:
|
*Notes*:
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
|
|
||||||
@@ -4841,10 +4841,10 @@ one of the allowed TypedArray functions.
|
|||||||
*Notes*:
|
*Notes*:
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_TYPEDARRAY`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_TYPEDARRAY`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
in runtime with the `JERRY_FEATURE_TYPEDARRAY` feature enum value,
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
|
|
||||||
@@ -4897,11 +4897,11 @@ Create a jerry_value_t representing a given type container object.
|
|||||||
- This method is expected to work the same way as the JavaScript Map constructor.
|
- This method is expected to work the same way as the JavaScript Map constructor.
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value)
|
||||||
when it is no longer needed.
|
when it is no longer needed.
|
||||||
- This API depends on a build option (`JERRY_ES2015_BUILTIN_CONTAINER`) and can be checked
|
- This API depends on a build option (`JERRY_BUILTIN_CONTAINER`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_MAP, JERRY_FEATURE_SET, JERRY_FEATURE_WEAKMAP, JERRY_FEATURE_WEAKSET`
|
in runtime with the `JERRY_FEATURE_MAP, JERRY_FEATURE_SET, JERRY_FEATURE_WEAKMAP, JERRY_FEATURE_WEAKSET`
|
||||||
feature enum values.
|
feature enum values.
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- The ES2015-subset profile enables this by default.
|
- The es.next profile enables this by default.
|
||||||
|
|
||||||
*New in version 2.3*.
|
*New in version 2.3*.
|
||||||
|
|
||||||
@@ -5009,6 +5009,7 @@ jerry_has_property (const jerry_value_t obj_val,
|
|||||||
- true/false API value - depend on whether the property exists
|
- true/false API value - depend on whether the property exists
|
||||||
|
|
||||||
*Changed in version 2.0*: The return value type is now a JavaScript value and not a primitive boolean value.
|
*Changed in version 2.0*: The return value type is now a JavaScript value and not a primitive boolean value.
|
||||||
|
*Changed in version 2.3*: The return value can be an error value.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
@@ -5068,6 +5069,7 @@ jerry_has_own_property (const jerry_value_t obj_val,
|
|||||||
- true/false API value - depend on whether the property exists
|
- true/false API value - depend on whether the property exists
|
||||||
|
|
||||||
*Changed in version 2.0*: The return value type is now a JavaScript value and not a primitive boolean value.
|
*Changed in version 2.0*: The return value type is now a JavaScript value and not a primitive boolean value.
|
||||||
|
*Changed in version 2.3*: The return value can be an error value.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
@@ -7934,10 +7936,10 @@ If used outside of a native C function it will return "undefined" value.
|
|||||||
*Notes*:
|
*Notes*:
|
||||||
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
- Returned value must be freed with [jerry_release_value](#jerry_release_value) when it
|
||||||
is no longer needed.
|
is no longer needed.
|
||||||
- This feature depends on build option (`JERRY_ES2015`) and can be checked
|
- This feature depends on build option (`JERRY_ESNEXT`) and can be checked
|
||||||
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value (as symbols are enabled in case of ES2015),
|
in runtime with the `JERRY_FEATURE_SYMBOL` feature enum value (as symbols are enabled in case of ES.next),
|
||||||
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
see: [jerry_is_feature_enabled](#jerry_is_feature_enabled).
|
||||||
- If the ES2015 mode is not enabled this method will always return the "undefined" value.
|
- If the ES.next mode is not enabled this method will always return the "undefined" value.
|
||||||
|
|
||||||
**Prototype**
|
**Prototype**
|
||||||
|
|
||||||
@@ -8058,7 +8060,7 @@ main (int argc, char** argv)
|
|||||||
|
|
||||||
# ArrayBuffer and TypedArray functions
|
# ArrayBuffer and TypedArray functions
|
||||||
|
|
||||||
These APIs all depend on the ES2015-subset profile.
|
These APIs all depend on the es.next profile.
|
||||||
|
|
||||||
## jerry_get_arraybuffer_byte_length
|
## jerry_get_arraybuffer_byte_length
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -1094,7 +1094,8 @@ int
|
|||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
/* Initialize srand value */
|
/* Initialize srand value */
|
||||||
srand ((unsigned) jerry_port_get_current_time ());
|
union { double d; unsigned u; } now = { .d = jerry_port_get_current_time () };
|
||||||
|
srand (now.u);
|
||||||
|
|
||||||
/* Generate a random number, and print it */
|
/* Generate a random number, and print it */
|
||||||
const jerry_char_t script[] = "var a = Math.random (); print(a)";
|
const jerry_char_t script[] = "var a = Math.random (); print(a)";
|
||||||
|
|||||||
+2
-2
@@ -93,7 +93,7 @@ information.
|
|||||||
void jerry_port_print_char (char c);
|
void jerry_port_print_char (char c);
|
||||||
```
|
```
|
||||||
|
|
||||||
### ES2015 Module system
|
### Jerry Module system
|
||||||
|
|
||||||
The port API provides functions that can be used by the module system to open
|
The port API provides functions that can be used by the module system to open
|
||||||
and close source files, and normalize file paths.
|
and close source files, and normalize file paths.
|
||||||
@@ -145,7 +145,7 @@ jerry_port_normalize_path (const char *in_path_p, /**< input file path */
|
|||||||
* Get the module object of a native module.
|
* Get the module object of a native module.
|
||||||
*
|
*
|
||||||
* Note:
|
* Note:
|
||||||
* This port function is called by jerry-core when ES2015_MODULE_SYSTEM
|
* This port function is called by jerry-core when JERRY_MODULE_SYSTEM
|
||||||
* is enabled.
|
* is enabled.
|
||||||
*
|
*
|
||||||
* @param name String value of the module specifier.
|
* @param name String value of the module specifier.
|
||||||
|
|||||||
+2
-2
@@ -12,7 +12,7 @@ permalink: /module-system/
|
|||||||
|
|
||||||
The module system allows users to write import and export statements in scripts, which can be used to separate the logic of the application into custom modules.
|
The module system allows users to write import and export statements in scripts, which can be used to separate the logic of the application into custom modules.
|
||||||
The standard's relevant part can be found [here](https://www.ecma-international.org/ecma-262/6.0/#sec-modules).
|
The standard's relevant part can be found [here](https://www.ecma-international.org/ecma-262/6.0/#sec-modules).
|
||||||
Embedders wishing to use native builtin modules with ES6 imports can use the [Port API](05.PORT-API.md#es2015-module-system) to do so.
|
Embedders wishing to use native builtin modules with ES6 imports can use the [Port API](05.PORT-API.md#jerry-module-system) to do so.
|
||||||
|
|
||||||
## General
|
## General
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ export var version = "1.0 (e92ae0fb)";
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
// module_2.js
|
// module_2.js
|
||||||
var featureName = "EcmaScript 2015 modules";
|
var featureName = "EcmaScript modules";
|
||||||
var year = 2018;
|
var year = 2018;
|
||||||
|
|
||||||
export function getFeatureDetails() {
|
export function getFeatureDetails() {
|
||||||
|
|||||||
Reference in New Issue
Block a user