alexis89x/broadcast-channel

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

redfellow opened this issue · 2 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 :)