Skip to content

Instantly share code, notes, and snippets.

@josephernest
Last active December 29, 2020 18:15
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 josephernest/f3db7d319af407b2dcef04c7c1c514ee to your computer and use it in GitHub Desktop.
Save josephernest/f3db7d319af407b2dcef04c7c1c514ee to your computer and use it in GitHub Desktop.
Electron Fiddle Gist
<html>
<head>
<style>
* { margin: 0; }
#topright { float: right; width: 100px; background-color: blue; -webkit-app-region: no-drag; }
#topright:hover { background-color: black; }
#topleft { background-color: red; -webkit-app-region: drag; padding: 10px; }
</style>
</head>
<body>
<div id="topright" onclick="alert();">Click here!</div>
<div id="topleft"></div>
<script>
for (var i = 0; i < 50; i++)
document.getElementById("topleft").innerHTML += "<button>xyz" + i + "</button>";
</script>
</body>
</html>
const {app, BrowserWindow} = require('electron')
app.on('ready', function () {
mainWindow = new BrowserWindow({width: 800, height: 600, frame: false})
mainWindow.loadFile('index.html');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment