Added a note on "jscode"

gh-pages
Hauke D 7 years ago
parent 319acf47d9
commit fc1ce9b154

@ -470,7 +470,8 @@ stored in a Perl scalar `$foo` pointing to a JavaScript object `foo`:
- `jscode` returns a string of JavaScript code that represents a reference - `jscode` returns a string of JavaScript code that represents a reference
to the JavaScript object. You should treat the string as an opaque value, to the JavaScript object. You should treat the string as an opaque value,
no guarantees are made about its format and whether it may change in future no guarantees are made about its format and whether it may change in future
releases. This is an advanced function that should not normally be needed, releases. *Do not* call JavaScript's `delete` on this value.
This is an advanced function that should not normally be needed,
unless you are building strings of JavaScript to run. In that case, you unless you are building strings of JavaScript to run. In that case, you
may need to wrap the value in parentheses for it to evaluate correctly in may need to wrap the value in parentheses for it to evaluate correctly in
JavaScript. Example: `js( "console.log(".$jsobject->jscode.")" )` JavaScript. Example: `js( "console.log(".$jsobject->jscode.")" )`

Loading…
Cancel
Save