post_message_filter

1.0.4 • Public • Published

postMessage filter

This repo contains a utility for sanitising Javascript objects before passing them to postMessage.

Getting Started

Add to your package.json by

npm add post_message_filter

Then in your code

import deleteNonClonable from 'post_message_filter/delete_non_clonable';

...

function postMessageWrapper(message, targetOrigin) {
  const filteredMessage = deleteNonClonable(message);
  postMessage(filteredMessage, targetOrigin);
}

Building

The delete_non_clonable.js is the build file, the .ts file the source.

npm run build

Browser Support

IE11, last two versions of Chrome, Edge, and Firefox.

Readme

Keywords

none

Package Sidebar

Install

npm i post_message_filter

Weekly Downloads

0

Version

1.0.4

License

Apache-2.0

Unpacked Size

8.5 kB

Total Files

5

Last publish

Collaborators

  • sandlerr