mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
handle onDisconnect
This commit is contained in:
parent
055e0f8dac
commit
fdff768549
4
app/vendor/trezor/content-script.js
vendored
4
app/vendor/trezor/content-script.js
vendored
@ -6,6 +6,10 @@ let port = chrome.runtime.connect({ name: 'trezor-connect' });
|
||||
port.onMessage.addListener(message => {
|
||||
window.postMessage(message, window.location.origin);
|
||||
});
|
||||
port.onDisconnect.addListener(d => {
|
||||
port = null;
|
||||
});
|
||||
|
||||
/*
|
||||
Passing messages from popup to background script
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user