Closed ahmadnassri closed 8 years ago
As discussed in #154, this actually isn't reliable, the page could have a Content-Security-Policy
that disables top-level navigation by scripts in iframes; consider #154's more robust technique instead.
@laughinghan ah, i had this fixed on my fork for a while, and completely missed #154 ... (should have checked before opening this)
+1000 for postMessage
, certainly a better approach.
when the widget is used inside an iframe,
location.href
is not enough to trigger a redirect.top.location
(and alias ofwindow.top.location
) will ensure the redirect is correctly triggered.