-
Notifications
You must be signed in to change notification settings - Fork 40
/
calculator.html
38 lines (34 loc) · 1.1 KB
/
calculator.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width"/>
<!-- inspired by https://github.com/mdn/simple-web-worker -->
<title>Web Workers calculator</title>
<!-- <link rel="stylesheet" href="style.css"> -->
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<h1>Promise-Workers calculator</h1>
<form>
<div>
<input type="text" id="number1" value="0" size="1"/>
<select id="operator">
<option value="plus">+</option>
<option value="minus">-</option>
<option value="times">*</option>
<option value="divide">/</option>
</select>
<input type="text" id="number2" value="0" size="1"/>
= <span id="result"/>
</div>
<div id="status"/>
</form>
<script>const module = {}</script>
<script src="../dist/promise-worker.js"></script>
<script src="calculator.js"></script>
</body>
</html>