forked from ajaxorg/ace
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworker.html
More file actions
33 lines (24 loc) · 692 Bytes
/
worker.html
File metadata and controls
33 lines (24 loc) · 692 Bytes
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>worker</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Fabian Jakobs">
<!-- Date: 2010-04-08 -->
</head>
<body>
<script type="text/javascript" charset="utf-8">
var worker = new Worker("worker.js");
worker.onmessage = function(e) {
console.log(e.data);
};
worker.onerror = function(e) {
console.log(e.data);
};
worker.postMessage("postMessage('juhu')");
worker.postMessage("postMessage('juhu')");
</script>
</body>
</html>