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
63
64
65
66
|
<!DOCTYPE HTML>
<html dir="ltr" lang="en-US">
<head>
<meta charset="utf-8">
<title>Test the web console output - 02</title>
<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
-->
</head>
<body>
<p>hello world!</p>
<script type="text/javascript">
function testfn1() { return 42; }
var testobj1 = {
testfn2: function() { return 42; },
};
function testfn3() { return 42; }
testfn3.displayName = "testfn3DisplayName";
var array1 = [1, 2, 3, "a", "b", "c", "4", "5"];
var array2 = ["a", document, document.body, document.body.dataset,
document.body.classList];
var array3 = [1, window, null, "a", "b", undefined, false, "", -Infinity, testfn3, testobj1, "foo", "bar"];
var array4 = new Array(5);
array4.push("test");
array4.push(array4);
var typedarray1 = new Int32Array([1, 287, 8651, 40983, 8754]);
var set1 = new Set([1, 2, null, array3, "a", "b", undefined, document.head]);
set1.add(set1);
var bunnies = new String("bunnies")
var weakset = new WeakSet([bunnies, document.head]);
var testobj2 = {a: "b", c: "d", e: 1, f: "2"};
testobj2.foo = testobj1;
testobj2.bar = testobj2;
Object.defineProperty(testobj2, "getterTest", {
enumerable: true,
get: function() {
return 42;
},
});
var testobj3 = {a: "b", c: "d", e: 1, f: "2", g: true, h: null, i: undefined,
j: "", k: document.styleSheets, l: document.body.childNodes,
o: new Array(125), m: document.head};
var testobj4 = {a: "b", c: "d"};
Object.defineProperty(testobj4, "nonEnumerable", { value: "hello world" });
var map1 = new Map([["a", "b"], [document.body.children, testobj2]]);
map1.set(map1, set1);
var weakmap = new WeakMap([[bunnies, 23], [document.body.children, testobj2]]);
</script>
</body>
</html>
|