package js_of_ocaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=e59bbffcaefaba3191620556514b7f53bb3249e3f881a070d72724234dffd819
sha512=bb470f316f9c81a3b2b8dedd0b0f18f8e06beb48dd70df1d9f846de90ffab439cab5ef7a93a8166af0998068b06097e8319bc0d9f4f23a7159b0de8b3b515746
doc/js_of_ocaml/Js_of_ocaml/Sys_js/index.html
Module Js_of_ocaml.Sys_jsSource
Javascript specific Sys functions.
Io.
Set a callback to be called when an out_channel flush its buffer. set_channel_flusher chan cb install the callback cb for chan out_channel. cb will be called with the string to flush.
Set a callback to be called when an in_channel wants to fill its buffer. set_channel_filler chan cb install the called cb for chan in_channel. The string returned by cb will be appended to the channel buffer.
Pseudo filesystem.
Register a callback to the path to dynamically load missing files. Whenever a file is missing in path, the callback is used to optionally get the content of the file. mount ~path f register the callback f to the path path. The callback f receives (prefix,suffix) where:
prefixis the path the function has been registered to.Filename.contact prefix suffixis the absolute filename .
read_file name returns the content of the file name. Raise Sys_error if the file does not exist.
Register a file to a Pseudo Filesystem. create_file ~name ~content register the file name with content content so it can be opened with open_in name
Update a file in the Pseudo Filesystem. update_file ~name ~content update the file name with content content
Information.
js_of_ocaml_version is the version of Js_of_ocaml. It is a string of the form "major.minor[.patchlevel][+additional-info]", where major, minor, and patchlevel are integers, and additional-info is an arbitrary string. The [.patchlevel] and [+additional-info] parts may be absent.