mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-08-13 06:24:50 -05:00
add support for window.open (#59)
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
Test Window has been opened
|
||||
</html>
|
||||
Reference in New Issue
Block a user