Lately bumped into the same problem. It looks like panels can be open in the extension
(a) if it happens to have a toolbar popover;
(b) after the popover has been opened at least once.
It looks like Apple does not initialize some important infrasctructure for windows in the extension process before opening the popover. Not sure whether it's a bug or an intentional limitation.
Incidentally: although our panel (after opening the popover) seems to work normally, it does not seem to be resizable. Pretty darn weird.
Am afraid it did not help much; anyone from Apple who understands this stuff to rescue? We would actually need to be able to open windows and panels from an extension (even without a popover) pretty badly to co-operate with our injected scripts.
Lately, I have found even a plain NSAlert would not work in an extension (unless the popover has been already opened): an attempt to runModal one causes the extension to crash reporting “no service marshals available for modal session”.
We would really need to show transient panels/popovers/pop-up menus (task-specific ones, not just extra items in the generic context menu) from our extension code, to overlay them above the browser window and allow the user thus to control the extension (and through it, the injected JS code).
Is there a way to do that? And if not, is there a chance for it to be added in future versions?
Thanks a big lot!
Can we get some clarification here?
Is there any way to display a NSPanel, NSAlert, NSSavePanel, etc... from within SFSafariExtensionHandler?