Skip to content

Instantly share code, notes, and snippets.

@yaoduren123
Created November 21, 2020 01:32
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 yaoduren123/a3ed661fff9291419ed0d77a5ef1eb02 to your computer and use it in GitHub Desktop.
Save yaoduren123/a3ed661fff9291419ed0d77a5ef1eb02 to your computer and use it in GitHub Desktop.
Electron Fiddle Gist
<!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>
const notifier = require('electron-notifications')
// Just title
notifier.notify('Calendar')
// Full Options
notifier.notify('Calendar', {
message: 'Event begins in 10 minutes',
icon: 'http://cl.ly/J49B/3951818241085781941.png',
buttons: ['Dismiss', 'Snooze'],
})
// 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment