Lines Matching refs:JS
158 /* Check if there is any JS code parse error */
243 /* Create a "print" JS string */
245 /* Create a function from a native C method (this function will be called from JS) */
303 argument (which probably comes from a JavaScript source) to a JS string and prints it out to the st…
327 /* Convert the first argument to a string (JS "toString" operation) */
353 const jerry_char_t script[] = "print ('Hello from JS!');";
363 /* Create a "print" JS string */
365 /* Create a function from a native C method (this function will be called from JS) */
411 …s correct the application should print out the string passed for the `print` method in the JS code:
438 const jerry_char_t script[] = "print ('Hello from JS with ext!');";
479 …s correct the application should print out the string passed for the `print` method in the JS code:
565 … which wraps another value. This "error" can be created by throwing a JavaScript value from JS code
572 For example in JS such object be created with the following code example:
578 …is not an object on its own. This is the exception raised/thrown either via API methods or from JS.
579 For example, creating such error value in JS would look like this:
656 printf ("[JS object]");
750 printf ("[JS object]");
835 ## Example 9. Creating JS object in global context
875 /* Create an empty JS object */
878 /* Create a JS function object and wrap into a jerry value */
881 /* Set the native function as a property of the empty JS object */
887 /* Wrap the JS object (not empty anymore) into a jerry api value */
890 /* Add the JS object to the global context */
899 * Equivalent JS code:
940 ## Example 10. Extending JS Objects with native functions
942 The example creates a JS Object with `jerry_eval`, then it is extended from C with a native functio…
963 /* The the 'this_val' is the 'MyObject' from the JS code below */
1000 /* Create a JS object */
1019 /* Create a JS function object and wrap into a jerry value */