feat: add 'disableHtmlFullscreenWindowResize' option to webPreferences (#17203)
This option allows users to prevent the window from resizing when the HTML5 FullScreen API is used.
This commit is contained in:
parent
f3fc4023cf
commit
ac88b3ead5
7 changed files with 58 additions and 1 deletions
|
@ -379,6 +379,9 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
|||
content in the window, can be `no-user-gesture-required`,
|
||||
`user-gesture-required`, `document-user-activation-required`. Defaults to
|
||||
`no-user-gesture-required`.
|
||||
* `disableHtmlFullscreenWindowResize` Boolean (optional) - Whether to
|
||||
prevent the window from resizing when entering HTML Fullscreen. Default
|
||||
is `false`.
|
||||
|
||||
When setting minimum or maximum window size with `minWidth`/`maxWidth`/
|
||||
`minHeight`/`maxHeight`, it only constrains the users. It won't prevent you from
|
||||
|
|
|
@ -361,6 +361,14 @@ win.webContents.on('before-input-event', (event, input) => {
|
|||
})
|
||||
```
|
||||
|
||||
#### Event: 'enter-html-full-screen'
|
||||
|
||||
Emitted when the window enters a full-screen state triggered by HTML API.
|
||||
|
||||
#### Event: 'leave-html-full-screen'
|
||||
|
||||
Emitted when the window leaves a full-screen state triggered by HTML API.
|
||||
|
||||
#### Event: 'devtools-opened'
|
||||
|
||||
Emitted when DevTools is opened.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue