Are we allowed to use dialog.showModal from a webextension sidebar panel?

I tried but I am getting:
TypeError: dlg.showModal is not a function

I tested and it doesn’t work for browser_action panel either. I was thinking this could be a restriction so I tried using sendMessage to ask the background script to popup a dialog from its html page. But this also didn’t work. Then I tested in chrome and there I can use showModal directly from within browser_action script. So I believe firefox (as of v. 56.0) is lacking support for this.

Firefox does not support showModal, correct: https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal#Browser_compatibility

1 Like