Hello
I’m making an addon for firefox.
An error occur by below code.
What’s wrong?
Is it not allowed to open popup by a event from content_scrpt?
// error message
Error: browserAction.openPopup may only be called from a user input handler
//content_scripts
document.addEventListener(“mouseup”, function (event) {
browser.runtime.sendMessage({});
});
//background
browser.runtime.onMessage.addListener(notify);
function notify(infos) {
browser.browserAction.openPopup(); //<–error point
}