Merge pull request #2008 from MetaMask/mascara-fix

mascara - fix iframe stream constructor
feature/default_network_editable
kumavis 7 years ago committed by GitHub
commit 2885a95471
  1. 4
      mascara/src/lib/setup-iframe.js
  2. 4
      mascara/src/proxy.js

@ -1,5 +1,5 @@
const Iframe = require('iframe')
const IframeStream = require('iframe-stream').IframeStream
const createIframeStream = require('iframe-stream').IframeStream
module.exports = setupIframe
@ -13,7 +13,7 @@ function setupIframe(opts) {
})
var iframe = frame.iframe
iframe.style.setProperty('display', 'none')
var iframeStream = new IframeStream(iframe)
var iframeStream = createIframeStream(iframe)
return iframeStream
}

@ -1,4 +1,4 @@
const ParentStream = require('iframe-stream').ParentStream
const createParentStream = require('iframe-stream').ParentStream
const SWcontroller = require('client-sw-ready-event/lib/sw-client.js')
const SwStream = require('sw-stream/lib/sw-stream.js')
const SetupUntrustedComunication = ('./lib/setup-untrusted-connection.js')
@ -11,7 +11,7 @@ const background = new SWcontroller({
intervalDelay,
})
const pageStream = new ParentStream()
const pageStream = createParentStream()
background.on('ready', (_) => {
let swStream = SwStream({
serviceWorker: background.controller,

Loading…
Cancel
Save