Add example and notes on using require in renderer process

This commit is contained in:
Jessica Lord 2016-04-20 15:14:19 -07:00
parent 77abe0dd3a
commit 1e287bdb62
2 changed files with 7 additions and 0 deletions

View File

@ -11,4 +11,9 @@
Chromium <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.
</body>
<script>
// You can also require other files to run in this process
require('renderer.js')
</script>
</html>

2
renderer.js Normal file
View File

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