Skip to content

Commit 46a2e12

Browse files
committed
fix manual windows case: register listeners in new window callback
1 parent 47c0de6 commit 46a2e12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/manual/window/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
var win;
1313
gui.Window.open('popup.html', {
1414
x: 100, y: 100, width: 200, height: 300
15-
}, function(w) { win = w; });
15+
}, function(w) { win = w;
1616

1717
win.on('closed', function() {
1818
console.log('popup window is closed.');
@@ -26,6 +26,7 @@
2626
win.on('loaded', function() {
2727
console.log('new window loaded.');
2828
});
29+
});
2930

3031
function takeSnapshot() {
3132
gui.Window.get().capturePage(function(img) {
@@ -34,7 +35,7 @@
3435

3536
}, 'png');
3637
}
37-
38+
3839
gui.Window.get().on('close', function() {
3940
if (win != null)
4041
win.close(true);

0 commit comments

Comments
 (0)