Web_worker.SimulateSimulate the behaviour of a webworker in the main thread.
val start :
'rcv Base.Decode.t ->
('rcv -> unit) ->
'msg Base.Decode.t ->
'msg worker_function ->
tstart decode callback dec wfun Create and start a simulator of the webworker whose behaviour is described by the pair (dec, wfun).
val post_message : Base.Value.t -> t -> unitpost_message msg w Send the message msg to the webworker simulator w.
val terminate : t -> unitterminate w Terminate the webworker simulator w.