Code Block window.close()
On Safari, however, I get an uncatchable warning:
Code Block ⚠️ Can't close the window since it was not opened by JavaScript.
In the old days, we had to do this on Safari:
Code Block safari.extension.popovers[0].hide();
But that doesn't seem to be an option now. I'm assuming I need to delegate to the native app portion of the extension to close the popup, but I can't find any documentation on how to get a handle to the popup from NSExtensionRequestHandling. I can get a message to it using the nativeMessaging permissions and:
Code Block browser.runtime.sendNativeMessage("ignored", { message: "CLOSE_POPUP" })
...but once in the native app handler, I'm not sure what to do next. Any ideas?