mirror of
https://github.com/bitwarden/browser
synced 2025-12-26 05:03:33 +00:00
Merge branch 'autofill/pm-8518-autofill-scripts-do-not-inject-into-sub-frames-on-install' into autofill/pm-5189-fix-issues-present-with-inline-menu-rendering-in-iframes
This commit is contained in:
@@ -176,16 +176,16 @@ export class BrowserApi {
|
||||
return BrowserApi.tabSendMessage(tab, obj);
|
||||
}
|
||||
|
||||
static async tabSendMessage<T>(
|
||||
static async tabSendMessage<T, TResponse = unknown>(
|
||||
tab: chrome.tabs.Tab,
|
||||
obj: T,
|
||||
options: chrome.tabs.MessageSendOptions = null,
|
||||
): Promise<any> {
|
||||
): Promise<TResponse> {
|
||||
if (!tab || !tab.id) {
|
||||
return;
|
||||
}
|
||||
|
||||
return new Promise<any>((resolve) => {
|
||||
return new Promise<TResponse>((resolve) => {
|
||||
chrome.tabs.sendMessage(tab.id, obj, options, (response) => {
|
||||
if (chrome.runtime.lastError) {
|
||||
// Some error happened
|
||||
|
||||
Reference in New Issue
Block a user