I have been playing with tabs.create() and tabs.update() and the reason this fails is that we do not have `gBrowser` and `gBrowser.getTabDialogBox()` which is expected here: https://searchfox.org/mozilla-central/rev/0907529ff72c456ddb47839f5f7ba16291f28dce/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs#341 If I make [this](https://searchfox.org/mozilla-central/rev/0907529ff72c456ddb47839f5f7ba16291f28dce/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs#326) condition always fail, `tabs.create()` and `tabs.update()` seem to work with arbitrary uris, since the app prompter falls back to using the stand alone dialog instead of the overlay tabbed dialog. > I am really having a hard time with this request. Not even Firefox allows this the way you propose (via a menu action). I was obviously wrong, as tabs.update() can launch the external app without clearing the current tab. I had assumed two things: 1. Clearing the current tab during tabs.update() is normal 2. You need to create a new tab even in firefox, which would be close to what I proposed in comment #7. But you do not even need the handler.html file, you can really just use the destination uri directly (if ContentDispatchChooser.sys.mjs is patched). I have yet to understand, why the currently displayed tab/message is cleared for us.
Bug 1716200 Comment 10 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I have been playing with tabs.create() and tabs.update() and the reason this fails is that we do not have `gBrowser` and `gBrowser.getTabDialogBox()` which is expected here: https://searchfox.org/mozilla-central/rev/0907529ff72c456ddb47839f5f7ba16291f28dce/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs#341 If I make [this](https://searchfox.org/mozilla-central/rev/0907529ff72c456ddb47839f5f7ba16291f28dce/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs#326) condition always fail, `tabs.create()` and `tabs.update()` seem to work with arbitrary uris, since the app prompter falls back to using the stand alone dialog instead of the overlay tabbed dialog. > I am really having a hard time with this request. Not even Firefox allows this the way you propose (via a menu action). I was obviously wrong, as `tabs.update()` can launch the external app without clearing the current tab. I had assumed two things: 1. Clearing the current tab during `tabs.update()` is normal 2. You need to create a new tab even in firefox, which would be close to what I proposed in comment #7. But you do not even need the handler.html file, you can really just use the destination uri directly (if ContentDispatchChooser.sys.mjs is patched). I have yet to understand, why the currently displayed tab/message is cleared for us.
I have been playing with `tabs.create()` and `tabs.update()` and the reason this fails is that we do not have `gBrowser` and `gBrowser.getTabDialogBox()` which is expected here: https://searchfox.org/mozilla-central/rev/0907529ff72c456ddb47839f5f7ba16291f28dce/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs#341 If I make [this](https://searchfox.org/mozilla-central/rev/0907529ff72c456ddb47839f5f7ba16291f28dce/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs#326) condition always fail, `tabs.create()` and `tabs.update()` seem to work with arbitrary uris, since the app prompter falls back to using the stand alone dialog instead of the overlay tabbed dialog. > I am really having a hard time with this request. Not even Firefox allows this the way you propose (via a menu action). I was obviously wrong, as `tabs.update()` can launch the external app without clearing the current tab. I had assumed two things: 1. Clearing the current tab during `tabs.update()` is normal 2. You need to create a new tab even in firefox, which would be close to what I proposed in comment #7. But you do not even need the handler.html file, you can really just use the destination uri directly (if ContentDispatchChooser.sys.mjs is patched). I have yet to understand, why the currently displayed tab/message is cleared for us.
I have been playing with `tabs.create()` and `tabs.update()` and the reason this fails is that we do not have `gBrowser` and `gBrowser.getTabDialogBox()` which is expected here: https://searchfox.org/mozilla-central/rev/0907529ff72c456ddb47839f5f7ba16291f28dce/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs#341 If I make [this](https://searchfox.org/mozilla-central/rev/0907529ff72c456ddb47839f5f7ba16291f28dce/toolkit/mozapps/handling/ContentDispatchChooser.sys.mjs#326) condition always fail, `tabs.create()` and `tabs.update()` seem to work with arbitrary uris, since the app prompter falls back to using the stand alone dialog instead of the overlay tabbed dialog. > I am really having a hard time with this request. Not even Firefox allows this the way you propose (via a menu action). I was obviously wrong, as `tabs.update()` can launch the external app without clearing the current tab. I had assumed two things: 1. Clearing the current tab during `tabs.update()` is normal 2. You need to create a new tab even in firefox, which would be close to what I proposed in comment #7 (but you do not even need the handler.html file, you can really just use the destination uri directly, if ContentDispatchChooser.sys.mjs is patched). I have yet to understand, why the currently displayed tab/message is cleared for us.