Open gasche opened 11 years ago
Sys_js.register_autoload
allows to do that (with CORS restriction https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS)
see https://github.com/ocsigen/js_of_ocaml/blob/master/toplevel/toplevel.ml#L146
In the js_of_ocaml toplevel, the following will load http://ocsigen.org/resources/logos/text_js_of_ocaml_with_shadow.png
let image = open_in_bin "/http/ocsigen.org/resources/logos/text_js_of_ocaml_with_shadow.png"
@hhugo Is this documented somewhere? Thanks!
The (very real) use case is a desperate university student with no computer at home, and only access to a public computer in his or her school's library, severely restricted (basic Caml installation, no right to install additional libraries or basically write any file on the computer), willing to work on image manipulation in OCaml.
The following could work in TryOCaml:
Current (incorrect) output: