0
這裏是清單文件我創建一個Firefox webextension捕捉鼠標滾輪滾動和做一些事情,但我不能這樣做
{
"description": "",
"manifest_version": 2,
"name": "A",
"version": "0.2.0.2",
"permissions": [
"activeTab",
"contextMenus",
"tabs"
],
"icons": {
"48": "icons/48.png",
"96": "icons/96.png"
},
"background": {
"scripts" : ["background.js", "mouseWheel.js"]
}
}
的mouseWheel.js文件是:
window.addEventListener('DOMMouseScroll', mouseWheel);
function mouseWheel(e) {
console.log("Scroll capture Working");
}
每當我在任何頁面上滾動,它都應該打印滾動捕捉工作。但沒有迴應。與它自己的文檔(和它自己的控制檯)一種無形的標籤: