We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On the documentation page Export OCaml code to JavaScript, I had to modify the example to let it work.
Js.export "myMathLib" --> Js_of_ocaml.Js.export "myMathLib" without this, I have the error Error: Unbound module Js
Js.export "myMathLib"
Js_of_ocaml.Js.export "myMathLib"
Error: Unbound module Js
math.add(2,3) --> math.myMathLib.add(2,3) without this, I have the error TypeError: math.add is not a function
math.add(2,3)
math.myMathLib.add(2,3)
TypeError: math.add is not a function
The text was updated successfully, but these errors were encountered:
The ocaml side has been fixed in 43ded38
For the js side, I suspect you've mixed the two example. At least, I'm not able to reproduce your issue.
Sorry, something went wrong.
No branches or pull requests
On the documentation page Export OCaml code to JavaScript, I had to modify the example to let it work.
In the caml code:
Js.export "myMathLib"
-->Js_of_ocaml.Js.export "myMathLib"
without this, I have the error
Error: Unbound module Js
In the JS code:
math.add(2,3)
-->math.myMathLib.add(2,3)
without this, I have the error
TypeError: math.add is not a function
The text was updated successfully, but these errors were encountered: