mayfield,
thank you for the follow up comment. I came across the same issue and quickly resolved it because of you.
Post
Replies
Boosts
Views
Activity
Is is this about safari extensions?
It probably depends on the access you request in manifest.json (if it's a web extension). If you narrow the scope then there won't be any approval requests.
Yeah the popup is pretty slow on launch in compare to chrome. Chrome launches my extension's popup in almost immediately, while safari takes at least 1.5s.
I submitted feedback FB8937197
The code in the post doesn't work, the code in the comment does work in Safari.
In chrome it might throw a runtime error though if the background page reloads. Though there's no big harm in that.
hey bweinstein,
is it expected to work in options as well?
i have the following workflow: upon install, open onboarding in options
after onboarding, prompt for user to login
once logged in, display "success" confirmation and window.close() in 10 seconds.
getting the same error:
⚠️ Can't close the window since it was not opened by JavaScript.
Apparently there is a bug that context menus are not persisted between loads / launches.
So I deleted this part:
chrome.runtime.onInstalled.addListener(function() {
and with just this it works fine:
chrome.contextMenus.create({				
"title": chrome.i18n.getMessage("contextMenu"),				
"contexts": ["selection"],				
"id": "selection"		
});
What do you mean by "first code"? What specific command did you run?