electron/spec/fixtures/pages/webview-move-to-window.html
Dave Townsend 313b2faa3c Add a guestinstance attribute to webviews reflecting their current guest
instance ID and allowing moving a guest instance to a new webview.
2016-09-09 10:32:05 -07:00

17 lines
426 B
HTML

<html>
<body>
<script type="text/javascript" charset="utf-8">
var ipcRenderer = require('electron').ipcRenderer
ipcRenderer.on('guestinstance', function(event, instance) {
var webview = new WebView()
webview.setAttribute('guestinstance', instance)
document.body.appendChild(webview)
webview.addEventListener('did-attach', function (){
ipcRenderer.send('pong')
})
})
</script>
</body>
</html>