Add spec for native window.open from iframe

This commit is contained in:
Kevin Sawicki 2017-05-24 11:30:25 -07:00
parent 8f22e6a265
commit f5cf6d4ddd
3 changed files with 19 additions and 1 deletions

View file

@ -1,7 +1,7 @@
<html>
<body>
<script type="text/javascript" charset="utf-8">
const {ipcRenderer} = require('electron')
const {ipcRenderer} = window.top != null ? window.top.require('electron') : require('electron')
const popup = window.open()
popup.document.write('<h1>Hello</h1>')
const content = popup.document.querySelector('h1').innerText