Update the webpage (#3227)

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
Zsolt Borbély
2019-10-21 14:03:15 +02:00
committed by Dániel Bátyai
parent 09af6e670e
commit 3731fbf0af
4 changed files with 349 additions and 14 deletions
+26 -3
View File
@@ -93,10 +93,14 @@ information.
void jerry_port_print_char (char c);
```
### ES2015 Module system helper functions
### ES2015 Module system
The module system requires two specific functions for opening and closing files.
It also requires a platform specific way of normalizing file paths.
The port API provides functions that can be used by the module system to open
and close source files, and normalize file paths.
The `jerry_port_get_native_module` port function can be used to provide native
modules to the engine. This function will be called when an import/export
statement is encountered with an unknown module specifier, which embedders can
use to supply native module objects based on the module name argument.
```c
/**
@@ -136,6 +140,25 @@ jerry_port_normalize_path (const char *in_path_p, /**< input file path */
// write to out_buf_p the normalized path
// return length of written path
} /* jerry_port_normalize_path */
/**
* Get the module object of a native module.
*
* Note:
* This port function is called by jerry-core when ES2015_MODULE_SYSTEM
* is enabled.
*
* @param name String value of the module specifier.
*
* @return Undefined, if 'name' is not a native module
* jerry_value_t containing the module object, otherwise
*/
jerry_value_t
jerry_port_get_native_module (jerry_value_t name) /**< module specifier */
{
(void) name;
return jerry_create_undefined ();
}
```
## Date