docs: update formatting for mdx3 compatibility (#42099)
* docs: update formatting for mdx3 compatibility (#42052) docs: update formatting for mdx3 compat * escape curly braces
This commit is contained in:
		
					parent
					
						
							
								8969189a72
							
						
					
				
			
			
				commit
				
					
						9d7b2003e3
					
				
			
		
					 9 changed files with 13 additions and 10 deletions
				
			
		|  | @ -600,7 +600,7 @@ Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls | ||||||
| on the right edge and 50 pixels of controls below the player. In order to | on the right edge and 50 pixels of controls below the player. In order to | ||||||
| maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within | maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within | ||||||
| the player itself we would call this function with arguments of 16/9 and | the player itself we would call this function with arguments of 16/9 and | ||||||
| { width: 40, height: 50 }. The second argument doesn't care where the extra width and height | \{ width: 40, height: 50 \}. The second argument doesn't care where the extra width and height | ||||||
| are within the content view--only that they exist. Sum any extra width and | are within the content view--only that they exist. Sum any extra width and | ||||||
| height areas you have within the overall content view. | height areas you have within the overall content view. | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -723,7 +723,7 @@ Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls | ||||||
| on the right edge and 50 pixels of controls below the player. In order to | on the right edge and 50 pixels of controls below the player. In order to | ||||||
| maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within | maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within | ||||||
| the player itself we would call this function with arguments of 16/9 and | the player itself we would call this function with arguments of 16/9 and | ||||||
| { width: 40, height: 50 }. The second argument doesn't care where the extra width and height | \{ width: 40, height: 50 \}. The second argument doesn't care where the extra width and height | ||||||
| are within the content view--only that they exist. Sum any extra width and | are within the content view--only that they exist. Sum any extra width and | ||||||
| height areas you have within the overall content view. | height areas you have within the overall content view. | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -66,7 +66,7 @@ requests according to the specified protocol scheme in the `options` object. | ||||||
| ### `net.fetch(input[, init])` | ### `net.fetch(input[, init])` | ||||||
| 
 | 
 | ||||||
| * `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request) | * `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request) | ||||||
| * `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & { bypassCustomProtocolHandlers?: boolean } (optional) | * `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & \{ bypassCustomProtocolHandlers?: boolean \} (optional) | ||||||
| 
 | 
 | ||||||
| Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response). | Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response). | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -695,7 +695,7 @@ Returns `Promise<void>` - Resolves when all connections are closed. | ||||||
| #### `ses.fetch(input[, init])` | #### `ses.fetch(input[, init])` | ||||||
| 
 | 
 | ||||||
| * `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request) | * `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request) | ||||||
| * `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & { bypassCustomProtocolHandlers?: boolean } (optional) | * `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & \{ bypassCustomProtocolHandlers?: boolean \} (optional) | ||||||
| 
 | 
 | ||||||
| Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response). | Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response). | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1288,7 +1288,7 @@ Ignore application menu shortcuts while this web contents is focused. | ||||||
| 
 | 
 | ||||||
| #### `contents.setWindowOpenHandler(handler)` | #### `contents.setWindowOpenHandler(handler)` | ||||||
| 
 | 
 | ||||||
| * `handler` Function\<{action: 'deny'} | {action: 'allow', outlivesOpener?: boolean, overrideBrowserWindowOptions?: BrowserWindowConstructorOptions}\> | * `handler` Function\<\{action: 'deny'\} | \{action: 'allow', outlivesOpener?: boolean, overrideBrowserWindowOptions?: BrowserWindowConstructorOptions\}\> | ||||||
|   * `details` Object |   * `details` Object | ||||||
|     * `url` string - The _resolved_ version of the URL passed to `window.open()`. e.g. opening a window with `window.open('foo')` will yield something like `https://the-origin/the/current/path/foo`. |     * `url` string - The _resolved_ version of the URL passed to `window.open()`. e.g. opening a window with `window.open('foo')` will yield something like `https://the-origin/the/current/path/foo`. | ||||||
|     * `frameName` string - Name of the window provided in `window.open()` |     * `frameName` string - Name of the window provided in `window.open()` | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ calls, and other compiler optimizations. The only workaround is to build an | ||||||
| unoptimized local build. | unoptimized local build. | ||||||
| 
 | 
 | ||||||
| The official symbol server URL for Electron is | The official symbol server URL for Electron is | ||||||
| <https://symbols.electronjs.org>. | [https://symbols.electronjs.org](https://symbols.electronjs.org). | ||||||
| You cannot visit this URL directly, you must add it to the symbol path of your | You cannot visit this URL directly, you must add it to the symbol path of your | ||||||
| debugging tool. In the examples below, a local cache directory is used to avoid | debugging tool. In the examples below, a local cache directory is used to avoid | ||||||
| repeatedly fetching the PDB from the server. Replace `c:\code\symbols` with an | repeatedly fetching the PDB from the server. Replace `c:\code\symbols` with an | ||||||
|  |  | ||||||
|  | @ -78,7 +78,8 @@ JavaScript transpilers (e.g. Babel, TypeScript) have historically supported ES M | ||||||
| syntax before Node.js supported ESM imports by turning these calls to CommonJS | syntax before Node.js supported ESM imports by turning these calls to CommonJS | ||||||
| `require` calls. | `require` calls. | ||||||
| 
 | 
 | ||||||
| <details><summary>Example: @babel/plugin-transform-modules-commonjs</summary> | <details> | ||||||
|  | <summary>Example: @babel/plugin-transform-modules-commonjs</summary> | ||||||
| 
 | 
 | ||||||
| The `@babel/plugin-transform-modules-commonjs` plugin will transform | The `@babel/plugin-transform-modules-commonjs` plugin will transform | ||||||
| ESM imports down to `require` calls. The exact syntax will depend on the | ESM imports down to `require` calls. The exact syntax will depend on the | ||||||
|  |  | ||||||
|  | @ -121,7 +121,7 @@ need to install Node.js themselves as a prerequisite to running your app. | ||||||
| 
 | 
 | ||||||
| To check which version of Node.js is running in your app, you can access the global | To check which version of Node.js is running in your app, you can access the global | ||||||
| [`process.versions`][] variable in the main process or preload script. You can also reference | [`process.versions`][] variable in the main process or preload script. You can also reference | ||||||
| <https://releases.electronjs.org/releases.json>. | [https://releases.electronjs.org/releases.json](https://releases.electronjs.org/releases.json). | ||||||
| 
 | 
 | ||||||
| ::: | ::: | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -222,7 +222,8 @@ with CommonJS module syntax: | ||||||
| - [app][app], which controls your application's event lifecycle. | - [app][app], which controls your application's event lifecycle. | ||||||
| - [BrowserWindow][browser-window], which creates and manages app windows. | - [BrowserWindow][browser-window], which creates and manages app windows. | ||||||
| 
 | 
 | ||||||
| <details><summary>Module capitalization conventions</summary> | <details> | ||||||
|  | <summary>Module capitalization conventions</summary> | ||||||
| 
 | 
 | ||||||
| You might have noticed the capitalization difference between the **a**pp | You might have noticed the capitalization difference between the **a**pp | ||||||
| and **B**rowser**W**indow modules. Electron follows typical JavaScript conventions here, | and **B**rowser**W**indow modules. Electron follows typical JavaScript conventions here, | ||||||
|  | @ -231,7 +232,8 @@ Notification) whereas camelCase modules are not instantiable (e.g. app, ipcRende | ||||||
| 
 | 
 | ||||||
| </details> | </details> | ||||||
| 
 | 
 | ||||||
| <details><summary>Typed import aliases</summary> | <details> | ||||||
|  | <summary>Typed import aliases</summary> | ||||||
| 
 | 
 | ||||||
| For better type checking when writing TypeScript code, you can choose to import | For better type checking when writing TypeScript code, you can choose to import | ||||||
| main process modules from `electron/main`. | main process modules from `electron/main`. | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Erick Zhao
				Erick Zhao