mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
WIP desktop communication
This commit is contained in:
@@ -4,3 +4,13 @@ const bitwardenMain = (window as any).bitwardenMain = new MainBackground();
|
|||||||
bitwardenMain.bootstrap().then(() => {
|
bitwardenMain.bootstrap().then(() => {
|
||||||
// Finished bootstrapping
|
// Finished bootstrapping
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const port = chrome.runtime.connectNative('com.8bit.bitwarden');
|
||||||
|
|
||||||
|
port.onMessage.addListener((msg: any) => {
|
||||||
|
console.log('Received' + msg);
|
||||||
|
});
|
||||||
|
port.onDisconnect.addListener(() => {
|
||||||
|
console.log('Disconnected');
|
||||||
|
});
|
||||||
|
port.postMessage({ text: 'Hello, my_application' });
|
||||||
|
|||||||
@@ -89,7 +89,8 @@
|
|||||||
"http://*/*",
|
"http://*/*",
|
||||||
"https://*/*",
|
"https://*/*",
|
||||||
"webRequest",
|
"webRequest",
|
||||||
"webRequestBlocking"
|
"webRequestBlocking",
|
||||||
|
"nativeMessaging"
|
||||||
],
|
],
|
||||||
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
|
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
|
||||||
"commands": {
|
"commands": {
|
||||||
|
|||||||
Reference in New Issue
Block a user