diff options
library - basic test server + partial safari fixes
Diffstat (limited to 'library/lib')
-rw-r--r-- | library/lib/setup-iframe.js | 3 | ||||
-rw-r--r-- | library/lib/setup-provider.js | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/library/lib/setup-iframe.js b/library/lib/setup-iframe.js index dfb51c676..db67163df 100644 --- a/library/lib/setup-iframe.js +++ b/library/lib/setup-iframe.js @@ -8,10 +8,11 @@ function setupIframe(opts) { opts = opts || {} var frame = Iframe({ src: opts.zeroClientProvider || 'https://zero.metamask.io/', - container: document.head, + 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 diff --git a/library/lib/setup-provider.js b/library/lib/setup-provider.js index ced07e0f0..9efd209cb 100644 --- a/library/lib/setup-provider.js +++ b/library/lib/setup-provider.js @@ -13,8 +13,9 @@ function getProvider(){ console.log('MetaMask ZeroClient - injecting zero-client iframe!') var iframeStream = setupIframe({ - zeroClientProvider: 'http://localhost:9001', + zeroClientProvider: 'http://127.0.0.1:9001', sandboxAttributes: ['allow-scripts', 'allow-popups', 'allow-same-origin'], + container: document.body, }) var inpageProvider = new MetamaskInpageProvider(iframeStream) |