Skip to content

Commit

Permalink
Add hidden option to initialize a window hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
kodie committed Oct 20, 2021
1 parent e077cb0 commit c3f3331
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/js/winbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function WinBox(params, _title){
x,
y,
max,
hidden,
top,
left,
bottom,
Expand Down Expand Up @@ -103,6 +104,7 @@ function WinBox(params, _title){
x = params["x"] || x;
y = params["y"] || y;
max = params["max"];
hidden = params["hidden"];
top = params["top"];
left = params["left"];
bottom = params["bottom"];
Expand Down Expand Up @@ -189,8 +191,6 @@ function WinBox(params, _title){
this.move().resize();
}

this.focus();

if(mount){

this.mount(mount);
Expand All @@ -204,6 +204,13 @@ function WinBox(params, _title){
this.setUrl(url);
}

if(hidden){
this.hide();
}
else{
this.focus();
}

register(this);
(root || body).appendChild(this.dom);
}
Expand Down

0 comments on commit c3f3331

Please sign in to comment.