在Chrome上debug會出現 Uncaught Error: can't load XRegExp twice in the same frame 已經不是一天兩天的問題了。然而雖然有警告,程式卻都跑得好好的我也就不管它了XD
今天總算是在這裡查到原因了
Chrome: Uncaught Error: can't load XRegExp twice in the same frame
Question:
The following code will fail in both of my chromes on 2 different computers (Windows 7 both of them, Chrome 12.0.742.100).
<script type="text/javascript">
location.hash = "#one";
location.hash = "#two";
location.hash = "#three";
</script>
I feel like I tried everything. Can anyone confirm this error on chrome, and does anyone have an idea as to how I fix it? Thanks a lot.
Answer:
It works fine with me on Chrome 12.0.742.100 on Win7. I'm assuming you have installed extensions? disable all extensions (or go to incognito mode) and try to load your page again. Errors from content scripts are also displayed in the javascript console. If you are not using XRegExp on your page, probably one of the extensions does.
Edit:
The source of the exception should be located to the right. Click it to go to the script that caused the exception.
Report:
I have no clue how I cannot have thought of this. You were completely correct, it was the chrome extension "XML Viewer". Thanks.
結論就是:
很有可能是因為chrome的某些plugin造成的問題,而且使用者那邊裝什麼plugin我們也管不著
既然束手無策而且也不會造成crash,就繼續不管它囉
沒有留言:
張貼留言