-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
40 lines (35 loc) · 1.01 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Electron file Name</title>
<style>
h1 {
color: red;
}
</style>
<script>
const { ipcRenderer } = require("electron")
function shareData() {
console.log("Working");
ipcRenderer.send("msg", "Hello from Render")
ipcRenderer.on("back-msg", (event, arg) => {
console.log("client:", arg);
})
}
// console.log("process = ", process.versions);
console.log("process = ", process.type);
setTimeout(() => {
console.log("____");
}, 500);
</script>
</head>
<body style="user-select: none; -webkit-app-region: drag">
<h1>This is electron</h1>
<h2>Hello code step by step</h2>
<br>
<button onclick="shareData()">Share Data</button>
<button onclick="process.hang()">Hang me</button>
</body>
</html>