Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open browser window #125

Closed
nithinraja opened this issue Oct 29, 2012 · 18 comments
Closed

Open browser window #125

nithinraja opened this issue Oct 29, 2012 · 18 comments
Milestone

Comments

@nithinraja
Copy link

Hi All,
I am working using node-webkit i need to open a window in browser in full screen (All browser window option enabled). Now i have specified the below config in package.json so i cant able to open a new window. Any idea?

Package.json:

{
"main": "index.html",
"name": "demo",
"window": {
"width":230,
"height": 400,
"position": "mouse",
"min_width": 230,
"min_height": 400,
"max_width": 400,
"max_height": 400,
"toolbar":true,
"frame":false,
"show":false
}
}

@Mithgol
Copy link
Contributor

Mithgol commented Oct 29, 2012

If you need your primary window to go fullscreen initially, specify "fullscreen": true in window, see the wiki for details.

Alternatively, use require('nw.gui').Window.get().enterFullscreen(), see the wiki for details.

@zcbenz zcbenz closed this as completed Oct 30, 2012
@zcbenz
Copy link
Contributor

zcbenz commented Oct 30, 2012

If you specify "show":false the window will be hidden.

@anandh
Copy link

anandh commented Nov 1, 2012

Hello Zcbenz,
I have one main window that contains tool bar and frame in false mode,
then i opened one child window by using like this

var new_win = gui.Window.get(
window.open('https://google.com')
);

I need to set frame and toolbar true for child window not in main window(parent).
Please confirm me is it possible or not??

@zcbenz
Copy link
Contributor

zcbenz commented Nov 1, 2012

It's not possible for now, I'll add a Window.open API to implement it.

@anandh
Copy link

anandh commented Nov 1, 2012

Ya thanks,
In which version this feature will going to implement??

@zcbenz
Copy link
Contributor

zcbenz commented Nov 1, 2012

In v0.3.3, if there are no other high-priority bugs.

@nithinraja
Copy link
Author

Hi All,
Is there is any option to open a default browser with full browser options by clicking the link like "Forgot Password" or "Go to Website".

@jorgenskogmo
Copy link

Hoping for this to reach us soon - so my chromeless main window can open its content-editor window with chrome :-)

@ghost ghost assigned zcbenz Nov 7, 2012
@zcbenz
Copy link
Contributor

zcbenz commented Nov 7, 2012

Just found this issue is closed...

Reopen to track the implementation of Windows.open.

@zcbenz zcbenz reopened this Nov 7, 2012
@jorgenskogmo
Copy link

With all the lovely new fields in the manifest its now possible to crash the app by setting things that should be mutually exclusive like "width: 200, height: 200, kiosk=true, fullscreen=false, resizable=false" would result in ... what?

@jorgenskogmo
Copy link

Hi, i use the following simple function to toggle in and out of kioskmode:

var _kioskmode = false;
function toggleKioskmode(){
    if( _kioskmode ){
        win.leaveKioskMode();
    }else{
        win.enterKioskMode();
    }
    _kioskmode = !_kioskmode;
}

Problem is, if I reload the page while in kioskmode, the _kioskmode var is (re)set to false again...

Also, if calling win.leaveKioskMode() when we have not entered it, makes the window disappear...!

Something like win.getKioskMode(), wich would return a boolean would be good.

(Using 0.3.2, only tested on Mac).

@zcbenz
Copy link
Contributor

zcbenz commented Nov 11, 2012

Got it, I'll add a toggleKioskMode() and toggleFullscreen().

@darsain
Copy link

darsain commented Nov 21, 2012

Also boolean status properties would be amazing, like isFullscreen, isKioskMode, isMinimized, ...

@Mithgol
Copy link
Contributor

Mithgol commented Nov 21, 2012

That would be a step forward.

But, on the second thought, what exactly would you do with those properties? Check them in setTimeout handler regularly? Not very efficient.

It could be made better if we could listen to some events like require('nw.gui').Window.get().on('fullscreen', ...) or require('nw.gui').Window.get().on('restore', ...) as #201 implies.

@Mithgol
Copy link
Contributor

Mithgol commented Nov 21, 2012

And if the wiki article “Window” is correct, you already can. There are events.

(Except for the kiosk mode, that is.)

  • Instead of checking some isMinimized, listen for 'minimize' and 'restore' events.
  • Instead of checking some isFullscreen, listen for 'enter-fullscreen' and 'leave-fullscreen' events.

@Mithgol
Copy link
Contributor

Mithgol commented Nov 21, 2012

On the third thought, properties like isFullscreen, isKioskMode, isMinimized are useful nevertheless, they could be used to get the initial state before you start listening to the corresponding events.

@zcbenz
Copy link
Contributor

zcbenz commented Nov 24, 2012

This is mistakenly closed, reopen again.

@zcbenz zcbenz reopened this Nov 24, 2012
zcbenz added a commit that referenced this issue Nov 29, 2012
zcbenz added a commit that referenced this issue Nov 29, 2012
@zcbenz
Copy link
Contributor

zcbenz commented Nov 30, 2012

Done, for addition documents for Window API see this.

@zcbenz zcbenz closed this as completed Nov 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants