mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-5742] Rework Usage of Extension APIs that Cannot be Called with the Background Service Worker (#7667)
* [PM-5742] Rework Usage of Extension APIs that Cannot be Called with the Background Service Worker * [PM-5742] Implementing jest tests for the updated BrowserApi methods * [PM-5742] Implementing jest tests to validate logic within added API calls * [PM-5742] Implementing jest tests to validate logic within added API calls * [PM-5742] Fixing broken Jest tests * [PM-5742] Fixing linter error
This commit is contained in:
@@ -160,12 +160,12 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
|
||||
}
|
||||
|
||||
// Opera has "sidebar_panel" as a ViewType but doesn't currently work
|
||||
if (this.isFirefox() && chrome.extension.getViews({ type: "sidebar" }).length > 0) {
|
||||
if (this.isFirefox() && BrowserApi.getExtensionViews({ type: "sidebar" }).length > 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Opera sidebar has type of "tab" (will stick around for a while after closing sidebar)
|
||||
const tabOpen = chrome.extension.getViews({ type: "tab" }).length > 0;
|
||||
const tabOpen = BrowserApi.getExtensionViews({ type: "tab" }).length > 0;
|
||||
return tabOpen;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user