更新时间:2023-12-05 18:59:40
在弹出页面时,不能使用 onClicked
方法. Google文档.
You can't use the onClicked
method when you have a popup page. Google docs.
onClicked:单击浏览器操作图标时触发.此事件不会触发如果浏览器操作有弹出窗口.
onClicked: Fired when a browser action icon is clicked. This event will not fire if the browser action has a popup.
如果您想同时保留两者,请考虑编写一个内容脚本.
If you want to keep both consider writing a content script.