我想知道如何禁用事件侦听器“复制”
我认为它是这样的:
.js 文件:
let btn = document.getElementById('btn');
document.body.addEventListener('click', function(e) {
if (e.target.id === 'btn') {
e.stopPropagation();
}
}, {
capture: false
});
提前致谢!
清单.json:
{
"name": "Test",
"version": "1.0",
"description": "Just testing!",
"manifest_version": 2,
"icons": {
"48": "images/icon_48.png",
"128": "images/icon_128.png"
},
"browser_action": {
"default_icon": "images/icon_16.png",
"default_popup": "popup.html"
}
}
相关分类