aboutsummaryrefslogtreecommitdiffstats
path: root/mascara/src/lib/setup-iframe.js
blob: db67163df1d03dfc4de400d4ea0a1428a1a5633d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const Iframe = require('iframe')
const IframeStream = require('iframe-stream').IframeStream

module.exports = setupIframe


function setupIframe(opts) {
  opts = opts || {}
  var frame = Iframe({
    src: opts.zeroClientProvider || 'https://zero.metamask.io/',
    container: opts.container || document.head,
    sandboxAttributes: opts.sandboxAttributes || ['allow-scripts', 'allow-popups'],
  })
  var iframe = frame.iframe
  iframe.style.setProperty('display', 'none')
  var iframeStream = new IframeStream(iframe)

  return iframeStream
}
d=1a93c881f05e4c06583556b7aa2824083f330342&showmsg=1'>Expand)AuthorAgeFilesLines * c*: Add missing USES={gnome,php,sdl,xorg}tobik2019-11-081-2/+2 * Sprinkle more USES=xorgzeising2019-11-081-0/+1 * Convert to UCL & cleanup pkg-message (categories a-c)mat2019-08-141-2/+6 * Update devel/readline to 8.0sunpoet2019-04-091-1/+1