Module Js_of_ocaml.Worker

Low-level bindgins to javascript Web Workers.

See the documented Javascript API and some more general documentation about the usage of WebWorker.

class type ['a, 'b] worker = object ... end
class type errorEvent = object ... end
class type 'a messageEvent = [Dom_html.element, 'a] Js_of_ocaml__.Dom_html.messageEvent

The type parameter 'a is the type of the data payload.

val create : string -> ('a, 'b) worker Js.t

Global function to be used by the worker.

val import_scripts : string list -> unit
val set_onmessage : ('a -> unit) -> unit
val post_message : 'a -> unit