Created
November 27, 2020 21:53
-
-
Save erickzhao/32e228b4b0e1be5e36d24665cc39c59d to your computer and use it in GitHub Desktop.
vmars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Hello World!</title> | |
| <link rel="stylesheet" type="text/css" href="./styles.css"> | |
| </head> | |
| <body> | |
| <h1>Hello World!</h1> | |
| <!-- All of the Node.js APIs are available in this renderer process. --> | |
| We are using Node.js <script>document.write(process.versions.node)</script>, | |
| Chromium <script>document.write(process.versions.chrome)</script>, | |
| and Electron <script>document.write(process.versions.electron)</script>. | |
| <script> | |
| // You can also require other files to run in this process | |
| require('./renderer.js') | |
| </script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const electron = require("electron") ; | |
| const app = electron.app ; | |
| const { BrowserView, BrowserWindow } = require('electron') ; | |
| app.on('ready', function() { | |
| const win = new BrowserWindow( {width: 600, height: 600, webPreferences: {nodeIntegration: true} | |
| }) ; | |
| const view = new BrowserView() ; | |
| win.setBrowserView(view); | |
| view.setBounds({ x: 10, y: 40, width: 750 , height: 500 }) ; | |
| view.webContents.loadURL('http://vmars.us/KidSafeBrowser/KidSafeBrowserHome.html') ; | |
| } ) ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Empty |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This file is required by the index.html file and will | |
| // be executed in the renderer process for that window. | |
| // All of the Node.js APIs are available in this process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Empty */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment