diff options
author | kumavis <kumavis@users.noreply.github.com> | 2017-06-13 04:27:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-13 04:27:04 +0800 |
commit | 27220b7bcd5ea1ebdae3bc1b494d28d9c828918c (patch) | |
tree | c9385fba3d742ca9cbfb9f3b4c6c9ef29c4f4a1b /mascara/src/lib/setup-iframe.js | |
parent | 57d1a1f1860e50837104a10b7b9f86d398c795ec (diff) | |
parent | 8af41f1b0539e70cf4c6e1f4a9f4b10ad13656fc (diff) | |
download | tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.gz tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.bz2 tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.lz tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.xz tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.tar.zst tangerine-wallet-browser-27220b7bcd5ea1ebdae3bc1b494d28d9c828918c.zip |
Merge branch 'master' into i#1203MainNetSwitch
Diffstat (limited to 'mascara/src/lib/setup-iframe.js')
-rw-r--r-- | mascara/src/lib/setup-iframe.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mascara/src/lib/setup-iframe.js b/mascara/src/lib/setup-iframe.js new file mode 100644 index 000000000..db67163df --- /dev/null +++ b/mascara/src/lib/setup-iframe.js @@ -0,0 +1,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 +} |