mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-09 09:51:02 +01:00
process bitwardenFrameId on safari
This commit is contained in:
parent
7d2c4cbd9a
commit
5c47b33967
@ -208,7 +208,14 @@ export class BrowserApi {
|
|||||||
callback(msg, sender, response);
|
callback(msg, sender, response);
|
||||||
});
|
});
|
||||||
} else if (BrowserApi.isSafariApi) {
|
} else if (BrowserApi.isSafariApi) {
|
||||||
SafariApp.addMessageListener(name, callback);
|
SafariApp.addMessageListener(name, (message: any, sender: any, response: any) => {
|
||||||
|
if (message.bitwardenFrameId != null) {
|
||||||
|
if (sender != null && typeof (sender) === 'object' && sender.frameId == null) {
|
||||||
|
sender.frameId = message.bitwardenFrameId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
callback(message, sender, response);
|
||||||
|
});
|
||||||
/*
|
/*
|
||||||
safari.application.addEventListener('message', async (msgEvent: any) => {
|
safari.application.addEventListener('message', async (msgEvent: any) => {
|
||||||
callback(msgEvent.message, {
|
callback(msgEvent.message, {
|
||||||
|
Loading…
Reference in New Issue
Block a user