18 Commits
Author SHA1 Message Date
claude[bot]andClaude Opus 5.5 40ebdcc38d docs: fix code block line highlighting after docs reformats (#55097)
* docs: fix code block line highlighting after lint reformats

Several highlighted code blocks in the IPC and preload tutorials had their
line-highlight ranges drift when the docs code blocks were auto-formatted
(the `import/order` blank line added in #42113, and the if/else collapse in
#38260), so the highlights now land one line off from the code they were
meant to call out. Update the ranges to point back at the originally
highlighted code without changing the code blocks themselves.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9enZ3jn8BveASiB5p9G1E

* docs: fix code block line highlighting that drifted from content edits

The Playwright examples in automated-testing.md lost a line when their two
`require` statements were merged, leaving the highlights one line late, and
the code signing examples replaced a two-line certificate option with a
`windowsSign` object while keeping the old two-line ranges. Point the
highlights back at the intended code and cover the whole `windowsSign`
object.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01A9enZ3jn8BveASiB5p9G1E

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 07:59:47 -04:00
Samuel Attard 05f60b5068 refactor: remove Node.js shims from sandboxed preload scripts (#53891)
* refactor: remove Node.js shims from sandboxed preload scripts

BREAKING CHANGE. Sandboxed preload scripts and service worker preload
scripts no longer get the `events`, `timers` and `url` module shims from
`require`, and are no longer run with `Buffer`, `setImmediate` and
`clearImmediate` in scope. `require` only loads `electron`; `process` and
`global` are still provided.

These were npm browser polyfills compiled into the bundle that every
sandboxed renderer evaluates, and made up about two thirds of it. With them
gone the preload wrapper's parameter list is fixed again, so the code cache
no longer needs to be keyed on the wrapper shape.

* docs: tabulate the removed preload shims and their replacements
2026-09-17 15:07:37 -07:00
Fuqiao Xue 14bb846aa6 docs: remove self-closing syntax (#52494)
* docs: remove self-closing syntax

Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.

Ref:

- https://github.com/validator/validator/wiki/Markup-%C2%BB-Void-elements#trailing-slashes-in-void-element-start-tags-do-not-mark-the-start-tags-as-self-closing
- https://github.com/validator/validator/wiki/Markup-%C2%BB-Void-elements#trailing-slashes-directly-preceded-by-unquoted-attribute-values

* Markup fixes
2026-07-31 11:30:36 -04:00
Anny YangandNiklas Wenzel 0259abe920 docs: update remaining references to electron-quick-start (#47405)
* chore: udpate remaining references to electron-quick-start

* chore: Update docs/tutorial/tutorial-1-prerequisites.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* chore: Update docs/tutorial/tutorial-3-preload.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* chore: Update docs/tutorial/tutorial-2-first-app.md

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* chore: linebreak

* chore: swap minimal-repro for npx create-electron-app

* chore: add back code commands

* chore: add whitespace

* chore: remove reference to repo containing old quick start

---------

Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-06-12 10:32:17 +02:00
David Sanders 0d70389ccb chore: lint code blocks in docs with ESLint (#42113) 2025-05-29 12:45:26 -07:00
Josh Jancourtz 2f288bc7cc docs: fix grammar in preload tutorial summary (#45522) 2025-02-10 16:15:32 -05:00
Nikhil Simon Toppo ab2a4fd836 docs: corrected the ipcMain import path (#40764)
Update tutorial-3-preload.md

corrected the import path for ipcMain
2023-12-19 12:30:48 -06:00
Erick Zhao b8ac798344 docs: use node: imports for node core modules (#39681)
docs: use `node:` imports for node builtin modules
2023-08-30 11:55:23 -04:00
David Sanders 905aad9cb6 chore: type check JS in docs (#38423)
* build(deps): update @electron/lint-roller

* chore: type check JS in docs

* docs: add @ts-check and @ts-expect-error to code blocks

* chore: fix type check errors in docs

* chore: add ts-type to blocks
2023-06-05 16:26:26 +09:00
David Sanders eeb1e7d499 chore: fix lint:js-in-markdown script (#38260) 2023-05-15 09:58:35 +02:00
Russell Carpenella 7f5364f98d docs: moves icpMain.handle call in tutorial part 3 (#38138) 2023-05-03 14:52:02 +02:00
David Sanders d94f35a8f6 chore: disallow shortcut reference links in docs Markdown (#36860)
* chore: disallow shortcut reference links in docs Markdown

* docs: clean up shortcut-style links
2023-01-16 10:22:49 +01:00
David Sanders a9c03950c0 docs: cleanup reference links (#36659) 2023-01-11 22:16:34 -08:00
Roger Zurawicki 28cfaccb1d docs: update code highlights in tutorial (#36691)
docs: fix code highlighting in preload tutorial

The highlighted lines in the code snippets were unaligned,
which could cause a newcomer unneeded confusion on what
lines need to be changed.
2023-01-02 11:14:34 +01:00
MAPGarrett 8c837fda4f docs: Fix incorrect highlight in an example snippet (#36700)
Fix incorrect highlight in an example snippet

At the moment, the "Communicating between processes" `main.js` snippet highlights the line containing `})` when the relevant line is `ipcMain.handle('ping', () => 'pong')`.
2022-12-20 10:06:25 -08:00
Erick Zhao 34cb360730 docs: update sandbox renderer defaults for Electron 20 (#35379)
* docs: update E20 sandbox rendering defaults

* docs: update tutorial

* simplify paragraph

* dont mention context isolation
2022-09-08 13:21:50 -07:00
Gregory R. Wroblewski c16baa063a docs: fix missing includes in code example (#35479) 2022-09-07 15:37:29 +02:00
Erick Zhao e410109a3d docs: expand tutorial (#34604)
* docs: base tutorial update

* more docs

* zzz

* remove unused images
2022-06-22 17:17:48 +09:00