Skip to content

Commit 1e287bd

Browse files
committed
Add example and notes on using require in renderer process
1 parent 77abe0d commit 1e287bd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

index.html

+5
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,9 @@ <h1>Hello World!</h1>
1111
Chromium <script>document.write(process.versions.chrome)</script>,
1212
and Electron <script>document.write(process.versions.electron)</script>.
1313
</body>
14+
15+
<script>
16+
// You can also require other files to run in this process
17+
require('renderer.js')
18+
</script>
1419
</html>

renderer.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// This file is required by the index.html file and will
2+
// be executed in the renderer process for that window.

0 commit comments

Comments
 (0)