зеркало из https://github.com/electron/electron.git
Minor doc updates to setSize/disableguestresize
This commit is contained in:
Родитель
9e51c779e1
Коммит
35e000024c
|
@ -1133,10 +1133,12 @@ Shows pop-up dictionary that searches the selected word on the page.
|
||||||
|
|
||||||
#### `contents.setSize(options)`
|
#### `contents.setSize(options)`
|
||||||
|
|
||||||
Controls the bounds of the [`<webview>`](web-view-tag.md) guest.
|
Set the size of the page. This is only supported for `<webview>` guest contents.
|
||||||
|
|
||||||
* `options` Object
|
* `options` Object
|
||||||
* `normal` Object (optional) - New size of the webview guest. This is can be used in combination with the [`disableguestresize`](web-view-tag.md#disableguestresize) attribute to manually resize the webview guest.
|
* `normal` Object (optional) - Normal size of the page. This can be used in
|
||||||
|
combination with the [`disableguestresize`](web-view-tag.md#disableguestresize)
|
||||||
|
attribute to manually resize the webview guest contents.
|
||||||
* `width` Integer
|
* `width` Integer
|
||||||
* `height` Integer
|
* `height` Integer
|
||||||
|
|
||||||
|
|
|
@ -253,8 +253,8 @@ Prevents the webview contents from resizing when the webview element itself is
|
||||||
resized.
|
resized.
|
||||||
|
|
||||||
This can be used in combination with
|
This can be used in combination with
|
||||||
[`webContents.setSize`](web-view-tag.md#contentssetsize) to manually
|
[`webContents.setSize`](web-contents.md#contentssetsizeoptions) to manually
|
||||||
resize the webview contents in reaction to e.g. window size changes. This can
|
resize the webview contents in reaction to a window size change. This can
|
||||||
make resizing faster compared to relying on the webview element bounds to
|
make resizing faster compared to relying on the webview element bounds to
|
||||||
automatically resize the contents.
|
automatically resize the contents.
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче