chore: correct hierarchy of BrowserWindow headings (#30905)

* chore: correct hierarchy of BrowserWindow headings

* Update docs/api/browser-window.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/api/browser-window.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

* Update docs/api/browser-window.md

Co-authored-by: Mark Lee <malept@users.noreply.github.com>

Co-authored-by: Mark Lee <malept@users.noreply.github.com>
This commit is contained in:
Erick Zhao 2021-09-14 17:41:37 -07:00 committed by GitHub
parent 1295ba0ffc
commit 54b44584fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,12 +22,13 @@ win.loadFile('index.html')
To create a window without chrome, or a transparent window in arbitrary shape, To create a window without chrome, or a transparent window in arbitrary shape,
you can use the [Frameless Window](frameless-window.md) API. you can use the [Frameless Window](frameless-window.md) API.
## Showing window gracefully ## Showing the window gracefully
When loading a page in the window directly, users may see the page load incrementally, which is not a good experience for a native app. To make the window display When loading a page in the window directly, users may see the page load incrementally,
without visual flash, there are two solutions for different situations. which is not a good experience for a native app. To make the window display
without a visual flash, there are two solutions for different situations.
## Using `ready-to-show` event ### Using the `ready-to-show` event
While loading the page, the `ready-to-show` event will be emitted when the renderer While loading the page, the `ready-to-show` event will be emitted when the renderer
process has rendered the page for the first time if the window has not been shown yet. Showing process has rendered the page for the first time if the window has not been shown yet. Showing
@ -48,7 +49,7 @@ event.
Please note that using this event implies that the renderer will be considered "visible" and Please note that using this event implies that the renderer will be considered "visible" and
paint even though `show` is false. This event will never fire if you use `paintWhenInitiallyHidden: false` paint even though `show` is false. This event will never fire if you use `paintWhenInitiallyHidden: false`
## Setting `backgroundColor` ### Setting the `backgroundColor` property
For a complex app, the `ready-to-show` event could be emitted too late, making For a complex app, the `ready-to-show` event could be emitted too late, making
the app feel slow. In this case, it is recommended to show the window the app feel slow. In this case, it is recommended to show the window