开发者

Can I suppress error occuring from iframe?

开发者 https://www.devze.com 2023-03-20 22:34 出处:网络
I know how to suppress JavaScript errors(got source from here): <SCRIPT language=\"JavaScript\">

I know how to suppress JavaScript errors(got source from here):

<SCRIPT language="JavaScript">
<!--
function silentErrorHandler() {return true;}
window.onerror=silentErrorHandler;
//-->
</SCRIPT>

So, can I suppress error occuring from iframe? In my site, I'm using a Twitter Widget, and it keeps making error boxes. If I can't suppress that error, I might have to remove the Twitter Widg开发者_开发百科et.


No, you can't. You cannot access websites not in the „same origin“ as your website (look for „same origin policy“)

0

精彩评论

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