diff options
Diffstat (limited to 'app/scripts/platforms/extension.js')
-rw-r--r-- | app/scripts/platforms/extension.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/scripts/platforms/extension.js b/app/scripts/platforms/extension.js index 71b162dd..9ef0d22c 100644 --- a/app/scripts/platforms/extension.js +++ b/app/scripts/platforms/extension.js @@ -57,6 +57,18 @@ class ExtensionPlatform { } } + addMessageListener (cb) { + extension.runtime.onMessage.addListener(cb) + } + + sendMessage (message, query = {}) { + extension.tabs.query(query, tabs => { + tabs.forEach(tab => { + extension.tabs.sendMessage(tab.id, message) + }) + }) + } + _showConfirmedTransaction (txMeta) { this._subscribeToNotificationClicked() |