Closed in-chong closed 1 year ago
This is an issue with webextension-polyfill
, not the plugin, so I'm going to close the issue.
I can still help you out though, could you share a minimal reproduction? I need to see the whole project, not just where you add the listener, to understand what is happening.
Firstly, thank you for providing such an excellent code repository
I wanted to listen to users clicking on the plugin icon, so I used browser. action. onClicked, but it didn't actually take effect. I'm not sure what the reason is Here is my code snippet
//background.js browser.action.onClicked.addListener((tab) => { // 用户点击插件图标时执行的操作 console.log("Extension icon clicked!"); // 这里可以添加更多处理逻辑 });
But no matter what, we can't listen to the data