Skip to content

docs: update Quick Start Guide for Electron 12 - #28223

Merged
jkleinsc merged 6 commits into
electron:masterfrom
itsananderson:itsananderson/fix-quick-start-tutorial
Mar 16, 2021
Merged

jkleinsc merged 6 commits into
electron:masterfrom
itsananderson:itsananderson/fix-quick-start-tutorial

Conversation

@itsananderson

Copy link
Copy Markdown
Member

Description of Change

With contextIsolation enabled by default in Electron 12, the Getting Started Guide no longer works as it is written. In order for the basic example to display values from process.versions, this change adds a preload.js to the example.

Adding a preload script does increase the complexity of the "hello world" example, but setting contextIsolation: false in the example code seemed like a less ideal solution since it encourages insecure practices

Checklist

  • PR description included and stakeholders cc'd
  • relevant documentation is changed or added

Release Notes

Notes: no-notes

With `contextIsolation` enabled by default in Electron 12, the Getting Started Guide no longer works as it is written. In order for the basic example to display values from `process.versions`, we need to add a `preload.js` to the example.
@welcome

welcome Bot commented Mar 16, 2021

Copy link
Copy Markdown

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Mar 16, 2021
@itsananderson itsananderson changed the title docs: Update Quick Start Guide for Electron 12 docs: update Quick Start Guide for Electron 12 Mar 16, 2021

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good to me - just a few tweaks.

Comment thread docs/tutorial/quick-start.md Outdated
Comment thread docs/tutorial/quick-start.md Outdated
@jkleinsc jkleinsc mentioned this pull request Mar 16, 2021
@jkleinsc
jkleinsc merged commit b6ff12e into electron:master Mar 16, 2021
@welcome

welcome Bot commented Mar 16, 2021

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk

release-clerk Bot commented Mar 16, 2021

Copy link
Copy Markdown

No Release Notes

@trop

trop Bot commented Mar 16, 2021

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "12-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Mar 16, 2021

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "13-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Mar 17, 2021

Copy link
Copy Markdown
Contributor

@itsananderson has manually backported this PR to "13-x-y", please check out #28229

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Mar 18, 2021
mlaurencin pushed a commit that referenced this pull request Mar 18, 2021
* docs: Update Quick Start Guide for Electron 12

With `contextIsolation` enabled by default in Electron 12, the Getting Started Guide no longer works as it is written. In order for the basic example to display values from `process.versions`, we need to add a `preload.js` to the example.

* fix: annotate preload code block with a language

* docs: update quick-start Fiddle example to use preload to provide version info

* fix: ensure example files end in a newline

* docs: add security warning to instructions for turning off contextIsolation

Co-authored-by: John Kleinschmidt <[email protected]>

* docs: treat preload as an adjective instead of a noun

Co-authored-by: John Kleinschmidt <[email protected]>

Co-authored-by: John Kleinschmidt <[email protected]>
@erickzhao erickzhao mentioned this pull request May 14, 2021
3 tasks
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@electron electron deleted a comment Feb 16, 2026
@njarhoho1-a11y

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants