add support for window.open (#59)

This commit is contained in:
Lynn
2017-04-18 09:02:25 -07:00
committed by GitHub
parent 4c7a547f26
commit b2fcf1afc2
8 changed files with 268 additions and 212 deletions
+18
View File
@@ -46,6 +46,12 @@
<button id='snippet'>get snippet</button>
<p>snippet output:</p>
<image id='snippet-img'/>
<hr>
<p>Window activate:</p>
<button id='open-win'>open window</button>
<button id='bring-to-front'>bring open window to front</button>
</body>
<script>
var notfEl = document.getElementById('notf');
@@ -128,5 +134,17 @@
}
});
var win;
var openWinButton = document.getElementById('open-win');
openWinButton.addEventListener('click', function() {
console.log('win=', win)
win = window.open('win.html', 'test-window', 'height=100,width=100');
});
var front = document.getElementById('bring-to-front');
front.addEventListener('click', function() {
window.SYM_API.activate(win.name);
});
</script>
</html>
+5
View File
@@ -0,0 +1,5 @@
<html>
<head>
</head>
Test Window has been opened
</html>