2012-02-29 45 views
0

我的Firefox錯誤控制檯中出現以下錯誤。它顯示很多次,每次刷新頁面。Firefox控制檯錯誤:嘗試在已清除的範圍上運行編譯後並行腳本

Error: attempt to run compile-and-go script on a cleared scope Source File: chrome://firebug/content/net/httpActivityObserver.js Line: 136

這似乎出現在每個選項卡上,即使我從頁面中刪除所有代碼仍會發生。因此,我認爲這是一個Firefox的錯誤,而不是我自己的代碼中的東西。由於這個,我無法調試我自己的腳本。

任何幫助非常感謝。

+1

你運行的是哪個版本的Firefox和Firebug?您是否嘗試禁用所有附加組件(Firebug除外)? – j08691 2012-02-29 15:53:12

+0

版本10.0.2 firefox和1.9.1 firebuf,我會嘗試並現在禁用它們。謝謝。 – LeeTee 2012-02-29 16:51:21

+0

我禁用了附加功能,並且錯誤消息已經消失。所以它是一個附加組件。我怎麼知道它是哪一個? – LeeTee 2012-02-29 17:02:00

回答

1

這似乎是一個Firefox問題。我在下面寫的代碼在Chrome中完美工作,但在Firefox(12)中完全不起作用;與問題中所述的錯誤相同。

注意:我沒有安裝Firebug。我在Tools/Web Developer中使用了控制檯。

<html> 
<head> 
<script> 
    window.onload = function() { 
     document.write("CORS test"); 
     function createCORSRequest(method, url){ 
      var xhr = new XMLHttpRequest(); 
      if ("withCredentials" in xhr){ 
       xhr.open(method, url, true); 
      } else if (typeof XDomainRequest != "undefined"){ 
       xhr = new XDomainRequest(); 
       xhr.open(method, url); 
      } else { 
       xhr = null; 
      } 
      return xhr; 
     } 

     var request = createCORSRequest("GET", "http://a.localhost:25565/"); 

     function doneLoading(rq) 
     { 
      document.write(rq.responseText); 
     } 

     if (request){ 
      document.write("<br />Requested..<br /><br />"); 
      console.log(request); 
      request.onload = function() { doneLoading(request) } 
// THE ERROR POINTS TO THE ABOVE LINE 
      request.send(); 
     } 
     else { 
      document.write("<br />No request!"); 
     } 

    } 

</script> 
</head> 
<body> 
</body> 
</html> 
相關問題