TimelineExtension
TimelineExtension copied to clipboard
Firefox popout closure work-around
// COMPAT: popouts can’t be window.close() on Firefox for Android, Moving focus
// back to the active tab (the popout is never active) will close the popout.
function closePopOut()
{
browser.runtime.getPlatformInfo().then(
function(platformInfo)
{
if (platformInfo.os == 'android')
browser.tabs.update({active: true});
else
window.close();
},
window.close
);
}
https://www.ctrl.blog/entry/firefox-browseraction-close-popout-android
browser.tabs.update({active: true});
does not appear to be valid? (at least TypeScript complains about needing two arguments, tabId
and updateProperties
). Seems to be happy with chrome.tabs.update({active: true});
for Chrome.
You don’t need to specify tab id here.