mirror of
https://github.com/electron/electron.git
synced 2026-01-10 16:08:06 -05:00
feat: add webPreferences.enablePreferredSizeMode (#25874)
* feat: add preferredSizeMode preference * docs: webPreferences.preferredSizeMode and event * docs: better explain preferred size * docs: small improvement * refactor: preferredSizeMode -> enablePreferredSizeMode
This commit is contained in:
@@ -398,6 +398,11 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
||||
* `bypassHeatCheck` - Bypass code caching heuristics but with lazy compilation
|
||||
* `bypassHeatCheckAndEagerCompile` - Same as above except compilation is eager.
|
||||
Default policy is `code`.
|
||||
* `enablePreferredSizeMode` Boolean (optional) - Whether to enable
|
||||
preferred size mode. The preferred size is the minimum size needed to
|
||||
contain the layout of the document—without requiring scrolling. Enabling
|
||||
this will cause the `preferred-size-changed` event to be emitted on the
|
||||
`WebContents` when the preferred size changes. 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
|
||||
|
||||
Reference in New Issue
Block a user