diff --git a/docs/For Users/Migration/From 0.12 to 0.13.md b/docs/For Users/Migration/From 0.12 to 0.13.md index a4773e741b..9c11d5b1b2 100644 --- a/docs/For Users/Migration/From 0.12 to 0.13.md +++ b/docs/For Users/Migration/From 0.12 to 0.13.md @@ -37,7 +37,7 @@ ### Window -+ There is an id to identify each window. This will be used to remember the size and position of the window and restore that geometry when a window with the same id is later opened. The default id is `.main`. It could be specified in [Window.open](../../References/Window.md#windowopenurl-options-callback) ++ There is an `id` to identify each window. This will be used to remember the size and position of the window and restore that geometry when a window with the same `id` is later opened. It could be specified in [Window.open](../../References/Window.md#windowopenurl-options-callback) or [window subfields in manifest](../../References/Manifest Format.md#id) + Event `capturepagedone` of [`Window` API](../../References/Window.md#event-capturepagedone) is **deprecated**.Use the callback with the [`win.capturePage(callback [, config ])`](../../References/Window.md#wincapturepagecallback--config-) instead. + [Window.open](../../References/Window.md#windowopenurl-options-callback) is changed to passing the created window as the argument of the callback. + [Window.showDevtools](../../References/Window.md#winshowdevtoolsiframe-headless-callback) is changed to passing the created window as the argument of the callback. diff --git a/docs/References/Manifest Format.md b/docs/References/Manifest Format.md index f6188c7fc9..8205b7b6ab 100644 --- a/docs/References/Manifest Format.md +++ b/docs/References/Manifest Format.md @@ -161,6 +161,10 @@ Most of window subfields are inherited by sub windows opened by `window.open()` All of the window subfields can be overwritten by using [`new-win-policy` event](Window.md#event-new-win-policy-frame-url-policy). +### id + +* `{String}` the `id` used to identify the window. This will be used to remember the size and position of the window and restore that geometry when a window with the same id is later opened. [See also the Chrome App documentation](https://developer.chrome.com/apps/app_window#type-CreateWindowOptions) + ### title * `{String}` the default title of window created by NW.js, it's very useful if you want to show your own title when the app is starting. diff --git a/docs/References/Window.md b/docs/References/Window.md index 52bcb7645f..1fd7b2722b 100644 --- a/docs/References/Window.md +++ b/docs/References/Window.md @@ -61,7 +61,7 @@ nw.Window.open('https://github.com/nwjs/nw.js', {}, function(new_win) { - `new_instance` `{Boolean}` _Optional_ whether to open a new window in a separate render process. - `inject_js_start` `{String}` _Optional_ the script to be injected before document loaded. See [Manifest format](Manifest Format.md#inject_js_start) - `inject_js_end` `{String}` _Optional_ the script to be injected before document unloaded. See [Manifest format](Manifest Format.md#inject_js_end) - - `id` `{String}` _Optional_ the ID used to identify the window. This will be used to remember the size and position of the window and restore that geometry when a window with the same id is later opened. [See also the Chrome App documentation](https://developer.chrome.com/apps/app_window#type-CreateWindowOptions) + - `id` `{String}` _Optional_ the `id` used to identify the window. This will be used to remember the size and position of the window and restore that geometry when a window with the same id is later opened. [See also the Chrome App documentation](https://developer.chrome.com/apps/app_window#type-CreateWindowOptions) * `callback(win)` `{Function}` _Optional_ callback when with the opened native `Window` object Open a new window and load `url` in it. diff --git a/test/remoting/issue4493-win-open-size/index.html b/test/remoting/issue4493-win-open-size/index.html new file mode 100644 index 0000000000..2780efb4c7 --- /dev/null +++ b/test/remoting/issue4493-win-open-size/index.html @@ -0,0 +1,26 @@ + + +
+ + +