开发者

Is it possible to get top.location.href when the top frame is on another domain in Chrome?

开发者 https://www.devze.com 2023-04-12 19:09 出处:网络
I just noticed we have been having a bug when we\'ve been using: top.location = top.location.hre开发者_开发技巧f;

I just noticed we have been having a bug when we've been using:

top.location = top.location.hre开发者_开发技巧f;

To refresh the outer page. However it seems that Chrome doesn't give you a top.location or parent.location object with properties when the frame is on a different domain. Is there any workaround? This works fine in Firefox.


Doing this seem to accomplish what I want:

top.location.href = ""
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号