Skip to content

Commit dc4e80a

Browse files
authored
Code to create and close new window
1 parent c11336a commit dc4e80a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

new_browser_window.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*Create Window variable as global*/
2+
var Window;
3+
4+
function windowOpen(){
5+
/*Open a Window*/
6+
var to_show = "https://github.com/Kascique";
7+
var window_size = "width=500, height=400";
8+
Window = window.open(to_show, "", window_size);
9+
}
10+
11+
function closeWindows(){
12+
/*Close Window*/
13+
Window = window.close();
14+
}

0 commit comments

Comments
 (0)