Conversation
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.
|
💖 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:
Things that will help get your PR across the finish line:
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. |
jkleinsc
left a comment
There was a problem hiding this comment.
Overall, looks good to me - just a few tweaks.
…lation Co-authored-by: John Kleinschmidt <[email protected]>
Co-authored-by: John Kleinschmidt <[email protected]>
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
No Release Notes |
|
I was unable to backport this PR to "12-x-y" cleanly; |
|
I was unable to backport this PR to "13-x-y" cleanly; |
|
@itsananderson has manually backported this PR to "13-x-y", please check out #28229 |
* 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]>
Description of Change
With
contextIsolationenabled 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 fromprocess.versions, this change adds apreload.jsto the example.Adding a preload script does increase the complexity of the "hello world" example, but setting
contextIsolation: falsein the example code seemed like a less ideal solution since it encourages insecure practicesChecklist
Release Notes
Notes: no-notes