diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-03-24 02:06:38 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-03-24 02:06:38 +0800 |
commit | 45ab81fb45ec1043d617f66c308e2e7911c8e0ad (patch) | |
tree | 335c7abdb8491b39184f07c9426ae30792546385 /library/popup.js | |
parent | d4e8ff188bc82a974fd0a767c2676d4a4b9747b4 (diff) | |
download | tangerine-wallet-browser-45ab81fb45ec1043d617f66c308e2e7911c8e0ad.tar tangerine-wallet-browser-45ab81fb45ec1043d617f66c308e2e7911c8e0ad.tar.gz tangerine-wallet-browser-45ab81fb45ec1043d617f66c308e2e7911c8e0ad.tar.bz2 tangerine-wallet-browser-45ab81fb45ec1043d617f66c308e2e7911c8e0ad.tar.lz tangerine-wallet-browser-45ab81fb45ec1043d617f66c308e2e7911c8e0ad.tar.xz tangerine-wallet-browser-45ab81fb45ec1043d617f66c308e2e7911c8e0ad.tar.zst tangerine-wallet-browser-45ab81fb45ec1043d617f66c308e2e7911c8e0ad.zip |
WIP: streams->indexdb
Diffstat (limited to 'library/popup.js')
-rw-r--r-- | library/popup.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/library/popup.js b/library/popup.js index 59b70edbb..3825661cf 100644 --- a/library/popup.js +++ b/library/popup.js @@ -1,7 +1,10 @@ const injectCss = require('inject-css') const MetaMaskUiCss = require('../ui/css') -const startPopup = require('../app/scripts/popup-core') const setupIframe = require('./lib/setup-iframe.js') +const MetamaskInpageProvider = require('../app/scripts/lib/inpage-provider.js') +const SWcontroller = require('./sw-controller') +const SwStream = require('sw-stream/lib/sw-stream.js') +const startPopup = require('../app/scripts/popup-core') var css = MetaMaskUiCss() @@ -15,5 +18,14 @@ var iframeStream = setupIframe({ sandboxAttributes: ['allow-scripts', 'allow-popups', 'allow-same-origin'], container: document.body, }) - -startPopup(iframeStream) +console.log('outside:open') +const background = new SWcontroller({ + fileName: '/popup/sw-build.js', +}) +background.on('ready', (readSw) => { + // var inpageProvider = new MetamaskInpageProvider(SwStream(background.controller)) + // startPopup(inpageProvider) + startPopup(SwStream(background.controller)) +}) +background.startWorker() +console.log('hello from /library/popup.js') |