package js_of_ocaml

  1. Overview
  2. Docs
Compiler from OCaml bytecode to JavaScript

Install

dune-project
 Dependency

Authors

Maintainers

Sources

js_of_ocaml-6.4.1.tbz
sha256=e59bbffcaefaba3191620556514b7f53bb3249e3f881a070d72724234dffd819
sha512=bb470f316f9c81a3b2b8dedd0b0f18f8e06beb48dd70df1d9f846de90ffab439cab5ef7a93a8166af0998068b06097e8319bc0d9f4f23a7159b0de8b3b515746

doc/js_of_ocaml/Js_of_ocaml/File/index.html

Module Js_of_ocaml.FileSource

File API

Sourceclass type blob = object ... end
Sourcetype 'a make_blob = ?contentType:string -> ?endings:[ `Transparent | `Native ] -> 'a -> blob Js.t
Sourceval blob_from_string : string make_blob
Sourceval blob_from_any : [ `blob of blob Js.t | `arrayBuffer of Typed_array.arrayBuffer Js.t | `arrayBufferView of Typed_array.arrayBufferView Js.t | `string of string | `js_string of Js.js_string Js.t ] list make_blob
Sourceclass type file = object ... end
Sourcetype file_any
Sourcemodule CoerceTo : sig ... end
Sourceclass type fileList = object ... end
Sourceclass type fileError = object ... end
Sourceclass type 'a progressEvent = object ... end
Sourceclass type progressEventTarget = object ... end
Sourcetype readyState =
  1. | EMPTY
  2. | LOADING
  3. | DONE
Sourceclass type fileReader = object ... end
Sourcemodule ReaderEvent : sig ... end
Sourceval filename : file Js.t -> Js.js_string Js.t

filename file is the name of file (equivalent to file##.name).

Sourceval addEventListener : (progressEventTarget Js.t as 'a) -> 'b Dom.Event.typ -> ('a, 'b) Dom.event_listener -> bool Js.t -> Dom.event_listener_id

Add an event listener. This function matches the addEventListener DOM method, except that it returns an id for removing the listener.