Skip to content

Instantly share code, notes, and snippets.

@t57ser
Created September 6, 2023 08:11
Show Gist options
  • Save t57ser/613c73a8a460520f4af5e309a34c36ea to your computer and use it in GitHub Desktop.
Save t57ser/613c73a8a460520f4af5e309a34c36ea to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<style>
body {
background: black;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
</style>
<body>
<div>
<select>
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3" selected="true">Option 3</option>
<option value="4">Option 4</option>
<option value="5">Option 5</option>
<option value="6">Option 6</option>
<option value="7">Option 7</option>
</select>
</div>
</body>
</html>
const { app, BrowserWindow } = require("electron");
const path = require("path");
const init = () => {
let browserWindow = new BrowserWindow({
show: true,
webPreferences: {
webviewTag: true,
}
});
browserWindow.webContents.loadURL(path.join(app.getAppPath(), "index.html"));
};
app.on("ready", () => {
init();
});
{
"main": "main.js",
"scripts": {
"start": "electron ."
},
"devDependencies": {
"electron": "26.1.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment