diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-03-10 10:24:41 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-03-10 10:24:41 +0800 |
commit | 9f3445252c766053b7a773d75dceb1c1bbfdc6f5 (patch) | |
tree | 9722cb40e5799cbda5a356d79ff6737254c50b9f /library/controller.js | |
parent | e602cb13c5266516aadeb1c6908575d43afe4164 (diff) | |
download | tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.gz tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.bz2 tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.lz tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.xz tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.tar.zst tangerine-wallet-browser-9f3445252c766053b7a773d75dceb1c1bbfdc6f5.zip |
put background in service worker
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..ba97da93c 100644 --- a/library/controller.js +++ b/library/controller.js @@ -1,3 +1,4 @@ +/* const urlUtil = require('url') const extend = require('xtend') const Dnode = require('dnode') @@ -157,3 +158,24 @@ function initializeZeroClient() { } } + +*/ +const SWcontroller = require('./sw-controller') +console.log('outside:open') +const background = new SWcontroller({ + fileName: 'sw-build.js', + registerOpts: { + scope: './', + } +}) + +background.startWorker() +.then(registerdWorker => { + return background.sendMessage('connect') +}) +.then((port) => { + debugger +}) +.catch(err => { + console.error(`SW Controller: ${err}`) +}) |