Why is the polyfill wrapped to window.top instead of the actual window?
redfellow opened this issue · 2 comments
redfellow commented
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.
alexis89x commented
Hi, it was meant to be since the original development of the polyfill was
part of a communication mechanism between a iframe content and its parent
(and some other parts..). But your comment is correct and I'll change it
asap. Thanks!
Il giorno gio 3 giu 2021 alle ore 09:16 redfellow ***@***.***>
ha scritto:
… 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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYSVBA3HUBC5UUMAOHDF33TQ4T6RANCNFSM46AFEK4A>
.
redfellow commented
Makes sense, and perhaps that functionality is important for some, but not others. Could be added in the readme :)