1.1.2 • Published 3 years ago

workaround v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

workaround

evalScript implementation to bypass CORS restrictions on new Adobe applications for use in <iframe> elements and bombino templates.

# Installation
npm i workaround
// Usage:
import { evalScript } from "workaround";

// Within async/await
let result = await evalScript(`
  (
    function() {
      alert("Hello world");
      return true;
    }();
  )
`);
console.log(result); // Returns true, regardless of location or iframe depth

Notes

  • This is not a standalone package, and relies on a window.addEventListener("message", callback) on the topmost window of the document to function properly. If you're using any bombino template, this is already taken care of. To see the implementation necessary on the topmost window, view any ./public/index-dev.html file of any bombino template (specifically the <script> tag containing window.addEventListener and callback).
1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago