mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
docs: define the name of the preload script (#28609)
Co-authored-by: KSneijders <32707500+KSneijders@users.noreply.github.com>
This commit is contained in:
@@ -123,7 +123,7 @@ The `index.html` page looks as follows:
|
||||
|
||||
#### Define a preload script
|
||||
|
||||
Your preload script acts as a bridge between Node.js and your web page. It allows you to expose specific APIs and behaviors to your web page rather than insecurely exposing the entire Node.js API. In this example we will use the preload script to read version information from the `process` object and update the web page with that info.
|
||||
Your preload script (in our case, the `preload.js` file) acts as a bridge between Node.js and your web page. It allows you to expose specific APIs and behaviors to your web page rather than insecurely exposing the entire Node.js API. In this example we will use the preload script to read version information from the `process` object and update the web page with that info.
|
||||
|
||||
```javascript fiddle='docs/fiddles/quick-start'
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
Reference in New Issue
Block a user