Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 823 Bytes

File metadata and controls

26 lines (16 loc) · 823 Bytes

Overview

dom_global_native.mjs simply exports global = globalThis. This is a counterpart to dom_global_shim.

When writing code which should isomorphically run in both DOM and non-DOM environments, import the pseudo-module dom_global, which should be auto-resolved to dom_global_native in browsers, and to dom_global_shim in non-browsers.

TOC

Usage

import * as dg from '@mitranim/js/dom_global'
console.log(dg.global)

API

Undocumented

The following APIs are exported but undocumented. Check dom_global_native.mjs.