我只想包含 jQuery,然后包含我的自定义 JS 文件来调用 ready() 事件。为了测试,我在我的 .js 文件上发出了警报,它运行良好。现在,当我更改 js 文件的内容时,它会一直发出相同的旧警报。现在在控制台中显示:
无法读取 chrome 清单 'file:///C:/Program%20Files/Mozilla%20Firefox/extensions/%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D/chrome.manifest'。
为什么调用 JS 文件,特别是 jquery 函数这么难?
我的文件内容如下:
chrome.manifest
content myext content/
overlay chrome://browser/content/browser.xul chrome://myext /content/myext.xul
我的ext.xul
<?xml version="1.0"?>
<overlay id="Scrapper-Overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://fbpicker/content/functions.js" />
</overlay>
函数.js
最初我把alert('test'); 它突然出现了。后来我放了:
window.addEventListener('load', function () {
gBrowser.addEventListener('DOMContentLoaded', function ()
{
alert("addd");
}, false);
}, false);
但它一直将测试显示为弹出窗口。
为什么 FF 正在缓存内容以及如何删除它?
在控制台上,我收到以下警告:
Timestamp: 8/6/2013 2:15:32 PM
Warning: XUL box for _moz_generated_content_before element contained an inline #text child, forcing all its children to be wrapped in a block.
Source File: chrome://global/content/bindings/toolbar.xml
Line: 382
Timestamp: 8/6/2013 2:15:32 PM
Warning: XUL box for _moz_generated_content_before element contained an inline #text child, forcing all its children to be wrapped in a block.
Source File: chrome://global/content/bindings/browser.xml
Line: 0
Timestamp: 8/6/2013 2:15:34 PM
Warning: Key event not available on some keyboard layouts: key="b" modifiers="accel,alt"
Source File: chrome://browser/content/browser.xul
Line: 0
Timestamp: 8/6/2013 2:15:30 PM
Warning: Unknown property 'order'. Declaration dropped.
Source File: resource://gre-resources/ua.css
Line: 46