Browser_expert.GlobalSourcetype t = [ | `Window of Browser_types.Globals.window Js_of_ocaml.Js.t| `Dedicated_worker of
Browser_types.Globals.dedicated_worker_global_scope Js_of_ocaml.Js.t| `Unknown of < > Js_of_ocaml.Js.t| `Undefined ]get returns the current JavaScript global scope as a variant type, identifying which kind of global scope is available in the current context.
`Unknown is the fallback variant for unrecognized global scopes
is_in_context retrieves the global object and checks to see whether or not we are in the provided context
window returns Window if it is the global scope. Otherwise, returns None
window returns Window if it is the global scope. Otherwise, raises
val dedicated_worker :
unit ->
Browser_types.Globals.dedicated_worker_global_scope Js_of_ocaml.Js.t optiondedicated_worker returns DedicatedWorkerGlobalScope if it is the global scope. Otherwise, returns None
val dedicated_worker_exn :
unit ->
Browser_types.Globals.dedicated_worker_global_scope Js_of_ocaml.Js.tdedicated_worker returns DedicatedWorkerGlobalScope if it is the global scope. Otherwise, raises
shared_worker returns SharedWorkerGlobalScope if it is the global scope. Otherwise, returns None
shared_worker returns SharedWorkerGlobalScope if it is the global scope. Otherwise, raises