1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-07 09:31:31 +01:00

tabs_query safari app

This commit is contained in:
Kyle Spearrin 2019-08-16 10:48:39 -04:00
parent 15d62e2d97
commit 31a257a5a3

View File

@ -93,7 +93,7 @@ export class BrowserApi {
return BrowserApi.tabSendMessage(tab, obj); return BrowserApi.tabSendMessage(tab, obj);
} }
static tabSendMessage(tab: any, obj: any, options: any = null): Promise<any> { static async tabSendMessage(tab: any, obj: any, options: any = null): Promise<any> {
if (!tab || !tab.id) { if (!tab || !tab.id) {
return; return;
} }
@ -108,6 +108,8 @@ export class BrowserApi {
}); });
}); });
} else if (BrowserApi.isSafariApi) { } else if (BrowserApi.isSafariApi) {
const tabs = await SafariApp.sendMessageToApp('tabs_query', JSON.stringify(options));
return tabs;
// TODO // TODO
/* /*
let t = tab.safariTab; let t = tab.safariTab;
@ -136,8 +138,6 @@ export class BrowserApi {
t.page.dispatchMessage('bitwarden', obj); t.page.dispatchMessage('bitwarden', obj);
} }
*/ */
return Promise.resolve();
} }
} }