Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 757 Bytes

File metadata and controls

23 lines (13 loc) · 757 Bytes

Overview

dom_global_shim.mjs re-exports global from dom_shim. This is a counterpart to dom_global_native.

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.

In code intended only for non-browser environments, simply import dom_global_shim instead.

TOC

Usage

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

API