|
|
@ -1,7 +1,6 @@ |
|
|
|
const createParentStream = require('iframe-stream').ParentStream |
|
|
|
const createParentStream = require('iframe-stream').ParentStream |
|
|
|
const SWcontroller = require('client-sw-ready-event/lib/sw-client.js') |
|
|
|
const SWcontroller = require('client-sw-ready-event/lib/sw-client.js') |
|
|
|
const SwStream = require('sw-stream/lib/sw-stream.js') |
|
|
|
const SwStream = require('sw-stream/lib/sw-stream.js') |
|
|
|
const SetupUntrustedComunication = ('./lib/setup-untrusted-connection.js') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let intervalDelay = Math.floor(Math.random() * (30000 - 1000)) + 1000 |
|
|
|
let intervalDelay = Math.floor(Math.random() * (30000 - 1000)) + 1000 |
|
|
|
const background = new SWcontroller({ |
|
|
|
const background = new SWcontroller({ |
|
|
@ -12,7 +11,7 @@ const background = new SWcontroller({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
const pageStream = createParentStream() |
|
|
|
const pageStream = createParentStream() |
|
|
|
background.on('ready', (_) => { |
|
|
|
background.on('ready', () => { |
|
|
|
let swStream = SwStream({ |
|
|
|
let swStream = SwStream({ |
|
|
|
serviceWorker: background.controller, |
|
|
|
serviceWorker: background.controller, |
|
|
|
context: 'dapp', |
|
|
|
context: 'dapp', |
|
|
|