@krakenjs/cross-domain-safe-weakmap

2.0.3 • Public • Published

Cross Domain Safe WeakMap

build status code coverage npm version apache license

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

Installation

As of version 2 this package will be published under the @krakenjs scope.

npm install @krakenjs/cross-domain-safe-weakmap

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.

Readme

Keywords

Package Sidebar

Install

npm i @krakenjs/cross-domain-safe-weakmap

Weekly Downloads

4,443

Version

2.0.3

License

Apache-2.0

Unpacked Size

131 kB

Total Files

16

Last publish

Collaborators

  • mnicpt
  • nbierdeman
  • gregjopa
  • krakenjs-user
  • ravishekhar00
  • dustijones
  • sdk-integrations-npm
  • wsbrunson
  • mstuart
  • sioked