docs: unify [!NOTE] structure (#47047)
* docs: unify [!NOTE] structure Co-authored-by: Erick Zhao <ezhao@slack-corp.com> * Update docs/api/command-line.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> Co-authored-by: Erick Zhao <erick@hotmail.ca> * Update docs/api/browser-window.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> Co-authored-by: Erick Zhao <erick@hotmail.ca> * Update docs/api/download-item.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> Co-authored-by: Erick Zhao <erick@hotmail.ca> * Update docs/api/global-shortcut.md Co-authored-by: Niklas Wenzel <dev@nikwen.de> Co-authored-by: Erick Zhao <erick@hotmail.ca> * revert line break Co-authored-by: Erick Zhao <ezhao@slack-corp.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Erick Zhao <ezhao@slack-corp.com> Co-authored-by: Erick Zhao <erick@hotmail.ca>
This commit is contained in:
parent
7030816fe1
commit
615b65b2a2
49 changed files with 508 additions and 323 deletions
|
@ -133,9 +133,10 @@ function handleKeyPress (event) {
|
|||
window.addEventListener('keyup', handleKeyPress, true)
|
||||
```
|
||||
|
||||
> Note: the third parameter `true` indicates that the listener will always receive
|
||||
key presses before other listeners so they can't have `stopPropagation()`
|
||||
called on them.
|
||||
> [!NOTE]
|
||||
> The third parameter `true` indicates that the listener will always receive
|
||||
> key presses before other listeners so they can't have `stopPropagation()`
|
||||
> called on them.
|
||||
|
||||
#### Intercepting events in the main process
|
||||
|
||||
|
|
|
@ -20,7 +20,8 @@ const win = new BrowserWindow({
|
|||
The `nodeIntegrationInWorker` can be used independent of `nodeIntegration`, but
|
||||
`sandbox` must not be set to `true`.
|
||||
|
||||
**Note:** This option is not available in [`SharedWorker`s](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker) or [`Service Worker`s](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker) owing to incompatibilities in sandboxing policies.
|
||||
> [!NOTE]
|
||||
> This option is not available in [`SharedWorker`s](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker) or [`Service Worker`s](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker) owing to incompatibilities in sandboxing policies.
|
||||
|
||||
## Available APIs
|
||||
|
||||
|
|
|
@ -83,4 +83,5 @@ After launching the Electron application, you should see the notification:
|
|||
|
||||

|
||||
|
||||
> Note: If you need to communicate the connection status to the main process, use the [IPC renderer](../api/ipc-renderer.md) API.
|
||||
> [!NOTE]
|
||||
> If you need to communicate the connection status to the main process, use the [IPC renderer](../api/ipc-renderer.md) API.
|
||||
|
|
|
@ -64,7 +64,8 @@ const contents = win.webContents
|
|||
console.log(contents)
|
||||
```
|
||||
|
||||
> Note: A renderer process is also created for [web embeds][web-embed] such as the
|
||||
> [!NOTE]
|
||||
> A renderer process is also created for [web embeds][web-embed] such as the
|
||||
> `BrowserView` module. The `webContents` object is also accessible for embedded
|
||||
> web content.
|
||||
|
||||
|
|
|
@ -14,8 +14,9 @@ dependency, you should be able to access the REPL with the following command:
|
|||
./node_modules/.bin/electron --interactive
|
||||
```
|
||||
|
||||
**Note:** `electron --interactive` is not available on Windows
|
||||
(see [electron/electron#5776](https://github.com/electron/electron/pull/5776) for more details).
|
||||
> [!NOTE]
|
||||
> `electron --interactive` is not available on Windows
|
||||
> (see [electron/electron#5776](https://github.com/electron/electron/pull/5776) for more details).
|
||||
|
||||
## Renderer process
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@ and only allow the capabilities you want to support.
|
|||
|
||||
### WebViews
|
||||
|
||||
> Important Note:
|
||||
[we do not recommend you to use WebViews](../api/webview-tag.md#warning),
|
||||
as this tag undergoes dramatic architectural changes that may affect stability
|
||||
of your application. Consider switching to alternatives, like `iframe` and
|
||||
Electron's [`WebContentsView`](../api/web-contents-view.md), or an architecture
|
||||
that avoids embedded content by design.
|
||||
> [!IMPORTANT]
|
||||
> [We do not recommend you to use WebViews](../api/webview-tag.md#warning),
|
||||
> as this tag undergoes dramatic architectural changes that may affect stability
|
||||
> of your application. Consider switching to alternatives, like `iframe` and
|
||||
> Electron's [`WebContentsView`](../api/web-contents-view.md), or an architecture
|
||||
> that avoids embedded content by design.
|
||||
|
||||
[WebViews](../api/webview-tag.md) are based on Chromium's WebViews and are not
|
||||
explicitly supported by Electron. We do not guarantee that the WebView API will
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue