cross-domain-safe-weakmap

1.0.29 • Public • Published

Cross Domain Safe WeakMap

WeakMap shim that works with cross-domain windows. Uses native WeakMap when available.

Rationale

Storing references to window objects is memory-expensive, even after those window objects have closed.

Existing WeakMap shims hang an object of the WeakMap key. This poses a problem when dealing with cross-domain windows, where setting or getting any key other than a pre-defined set of readonly values, will throw a cross-origin error.

/cross-domain-safe-weakmap/

    Package Sidebar

    Install

    npm i cross-domain-safe-weakmap

    Weekly Downloads

    37,139

    Version

    1.0.29

    License

    none

    Unpacked Size

    125 kB

    Total Files

    19

    Last publish

    Collaborators

    • gregjopa
    • bluepnume
    • wsbrunson
    • westeezy