mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
internal runtime messages in safari
This commit is contained in:
@@ -273,6 +273,14 @@ export default class MainBackground {
|
||||
}
|
||||
}
|
||||
|
||||
sendInternalRuntimeMessage(message: any) {
|
||||
if (!this.isSafari) {
|
||||
throw new Error('Only safari can send internal runtime messages.');
|
||||
}
|
||||
|
||||
this.runtimeBackground.processMessage(message, { tab: null }, () => { /* No response needed. */ });
|
||||
}
|
||||
|
||||
private async buildContextMenu() {
|
||||
if (this.isSafari || !chrome.contextMenus || this.buildingContextMenu) {
|
||||
return;
|
||||
|
||||
@@ -68,7 +68,7 @@ export default class RuntimeBackground {
|
||||
});
|
||||
}
|
||||
|
||||
private async processMessage(msg: any, sender: any, sendResponse: any) {
|
||||
async processMessage(msg: any, sender: any, sendResponse: any) {
|
||||
switch (msg.command) {
|
||||
case 'loggedIn':
|
||||
case 'unlocked':
|
||||
|
||||
Reference in New Issue
Block a user