Hello,
i have coded an WebExtension-AddOn for my personal use. In short: I add a new network protocol to windows 10 (player://) and connect this with an special windows script. Now i have coded an AddOn that create an context-menu that reparsed the link and use it for an tabs.update() action. As an example on youtube player://http://www.youtube.com/videolinkasexample.
browser.tabs.update({url: "player://https://www.youtube.com/asanexample"});
This called the ne protocol and shows up the protocol handler in firefox and the actual tabs was not updated, the tabs shows allways the youtube-site where i have called the protocol link.
This has functioned a long time with firefox version with WebExtensions. In the newest Version it happend nothing.
So then i have used tabs.create() and all functioned, but with an ugly new empty tab.
And i have figured out one strange thing:
When i call:
function updateFirstTab(tabs)
{
var updating = browser.tabs.update(tabs.id,
{
// active: true,
// loadReplace: true,
url: 'player://http://videoadress'
});
updating.then(onUpdated, onError);
}
var querying = browser.tabs.query({currentWindow:true});
querying.then(updateFirstTab, onError);
and the directly after this call an tabs.create()
browser.tabs.create({
url:"https://example.org"
});
He opened the tabs.update() and the tabs.create()
Is that an security change? Or an bug? But why tabs.create triggers an protocol tabs.update?
How can i call an protocol link in an context-menu without changing the actual tab. Ghostly;)?
Or when i must use tabs.create, how can i close the created tab after call the protocol - linkurl?
thx