-
Notifications
You must be signed in to change notification settings - Fork 103
/
demo.html
66 lines (42 loc) · 1.13 KB
/
demo.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
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>PrettyPrint</title>
<style type="text/css">
body {background:#EEE;color:#222;font:0.8em Arial,Verdana,Sans-Serif;margin:0;padding:20px;}
#debug {
width: 700px;
}
</style>
</head>
<body>
<!-- prettyPrint demo -->
<div id="debug"></div>
<script src="prettyprint.js"></script>
<script>
var randomObject = {
life: 42.01,
r1: new RegExp('\\$..?[0-5]+'),
r2: /foo(.+?)$/,
funky: function(foo, bib, bab) {
if (foo !== bib) {
console.log('Error: ', '...');
}
return RegExp(bab).exec(foo);
},
foo: {
prop: [1,2,3,{a:1}],
prop2: [
new Date(),
"som\"ething else"
]
},
domThing: document.body.firstChild
};
randomObject.circularRef = randomObject;
var ppTable = prettyPrint(randomObject);
document.getElementById('debug').appendChild(ppTable);
</script>
</body>
</html>