1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 00:03:56 +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:
Cesar Gonzalez
2024-05-31 16:16:15 -05:00
17 changed files with 802 additions and 505 deletions

View File

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

View File

@@ -18,7 +18,6 @@
"yargs": "17.7.2"
},
"devDependencies": {
"@tsconfig/node16": "1.0.4",
"@types/node": "18.19.29",
"@types/node-ipc": "9.2.3",
"typescript": "4.7.4"

View File

@@ -23,7 +23,6 @@
"yargs": "17.7.2"
},
"devDependencies": {
"@tsconfig/node16": "1.0.4",
"@types/node": "18.19.29",
"@types/node-ipc": "9.2.3",
"typescript": "4.7.4"