Did you know ... | Search Documentation: |
![]() | Predicate js_script/2 |
:- use_module(library(strings)). :- js_script({|string|| function myfunc(a) ... |}).
The implementation uses =:/2, calling the JavaScript function eval().
:- use_module(library(strings)). :- js_script({|string|| function myfunc(a) ... |}).
Options is currently ignored. While this used to add a
<script>
node to the document it now uses (=:)/2 to
evaluate the script. I.e. js_script is the same as:
?- _ := eval(String).