1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

internal runtime messages in safari

This commit is contained in:
Kyle Spearrin
2018-01-13 18:16:19 -05:00
parent 2156916f0b
commit b6a8594d08
3 changed files with 15 additions and 3 deletions

View File

@@ -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;