diff options
Diffstat (limited to 'library/controller.js')
-rw-r--r-- | library/controller.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/library/controller.js b/library/controller.js index 5823287cc..cbba9584a 100644 --- a/library/controller.js +++ b/library/controller.js @@ -1,3 +1,23 @@ +const ParentStream = require('iframe-stream').ParentStream +const SWcontroller = require('./sw-controller') +const SwStream = require('sw-stream/lib/sw-stream.js') +const SetupUntrustedComunication = ('./lib/setup-untrusted-connection.js') +const background = new SWcontroller({ + fileName: '/popup/sw-build.js', +}) + +background.on('ready', (readSw) => { + // var inpageProvider = new MetamaskInpageProvider(SwStream(background.controller)) + let pageStream = new ParentStream() + let swStream = SwStream(background.controller) + pageStream.pipe(swStream).pipe(pageStream) +}) + +background.on('error', console.error) +background.startWorker() + +console.log('hello from controller') +/* const urlUtil = require('url') const extend = require('xtend') const Dnode = require('dnode') @@ -157,3 +177,5 @@ function initializeZeroClient() { } } + +*/ |