mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
mascara - fix iframe stream constructor
This commit is contained in:
parent
b47d3735fe
commit
dbcc82f5c4
@ -1,5 +1,5 @@
|
|||||||
const Iframe = require('iframe')
|
const Iframe = require('iframe')
|
||||||
const IframeStream = require('iframe-stream').IframeStream
|
const createIframeStream = require('iframe-stream').IframeStream
|
||||||
|
|
||||||
module.exports = setupIframe
|
module.exports = setupIframe
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ function setupIframe(opts) {
|
|||||||
})
|
})
|
||||||
var iframe = frame.iframe
|
var iframe = frame.iframe
|
||||||
iframe.style.setProperty('display', 'none')
|
iframe.style.setProperty('display', 'none')
|
||||||
var iframeStream = new IframeStream(iframe)
|
var iframeStream = createIframeStream(iframe)
|
||||||
|
|
||||||
return iframeStream
|
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 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')
|
const SetupUntrustedComunication = ('./lib/setup-untrusted-connection.js')
|
||||||
@ -11,7 +11,7 @@ const background = new SWcontroller({
|
|||||||
intervalDelay,
|
intervalDelay,
|
||||||
})
|
})
|
||||||
|
|
||||||
const pageStream = new ParentStream()
|
const pageStream = createParentStream()
|
||||||
background.on('ready', (_) => {
|
background.on('ready', (_) => {
|
||||||
let swStream = SwStream({
|
let swStream = SwStream({
|
||||||
serviceWorker: background.controller,
|
serviceWorker: background.controller,
|
||||||
|
Loading…
Reference in New Issue
Block a user