-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (49 loc) · 1.66 KB
/
index.html
File metadata and controls
62 lines (49 loc) · 1.66 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<html>
<head>
<title>Proclamation!</title>
</head>
<body onload="init()">
Look in the console.
<pre style="background-color: #eee; border: 1px solid #999; padding: 20px;">
<code>
let herald = new Proclamation.Herald();
herald.hark(listener, this);
herald.hark(onceTest, this, true);
herald.proclaim("*GASP* Doth mine ears deceive me?");
herald.proclaim("*GASP* Doth mine ears deceive me?", "A second parameter?! What is this wizardry!!");
herald.unhand(listener, this);
herald.proclaim();
function listener(param1, param2) {
console.log(param1);
if (param2) {
console.log(param2);
}
}
function onceTest() {
console.log("Be gone, For I have had enough of your foolishness!");
}
</code>
</pre>
<script src="./proclamation.js"></script>
<script>
function init() {
let herald = new Proclamation.Herald();
herald.hark(listener, this);
herald.hark(onceTest, this, true);
herald.proclaim("*GASP* Doth mine ears deceive me?");
herald.proclaim("*GASP* Doth mine ears deceive me?", "A second parameter?! What is this wizardry!!");
herald.unhand(listener, this);
herald.proclaim();
}
function listener(param1, param2) {
console.log(param1);
if (param2) {
console.log(param2);
}
}
function onceTest() {
console.log("Be gone, for I have had enough of your foolishness!");
}
</script>
</body>
</html>