Module Browser_expert.GlobalSource

Sourceval get : unit -> t

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

Sourceval is_in_context : 'a. context:'a Browser_manually_written_bindings.Context.t -> t -> bool

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

dedicated_worker returns DedicatedWorkerGlobalScope if it is the global scope. Otherwise, returns None

dedicated_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