Skip to content

Instantly share code, notes, and snippets.

@nornagon
Last active April 11, 2022 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nornagon/bc382eeeb368b70fbed1e177bcaacfde to your computer and use it in GitHub Desktop.
Save nornagon/bc382eeeb368b70fbed1e177bcaacfde to your computer and use it in GitHub Desktop.
Electron Fiddle Gist
<!DOCTYPE html>
<body>
<iframe id="myythtml5player" frameborder="0" allowfullscreen="1" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" title="YouTube video player" width="720" height="405" src="https://www.youtube.com/embed/M7lc1UVf-VE"></iframe>
<script>
window.onkeydown = e => console.log(e.key)
</script>
// Modules to control application life and create native browser window
const { app, BrowserWindow } = require('electron')
const path = require('path')
app.whenReady().then(function () {
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js')
}
})
mainWindow.loadFile('index.html')
})
{
"name": "bawdy-discussion-instruct-g6bn0",
"productName": "bawdy-discussion-instruct-g6bn0",
"description": "My Electron application description",
"keywords": [],
"main": "./main.js",
"version": "1.0.0",
"author": "jeremy.rose",
"scripts": {
"start": "electron ."
},
"dependencies": {},
"devDependencies": {
"electron": "18.0.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment