alexis89x / broadcast-channel

A polyfill for the Broadcast Channel API, enabling communication across tabs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why is the polyfill wrapped to window.top instead of the actual window?

redfellow opened this issue · comments

I'm asking because window.top in a scenario where the Polyfill is running in an iframe, that has it's top window located in another domain triggers a CORS error. If I modify it to bind to the current window, things work as expected.

Makes sense, and perhaps that functionality is important for some, but not others. Could be added in the readme :)