|
1 <!DOCTYPE HTML> |
|
2 <html dir="ltr" lang="en-US"> |
|
3 <head> |
|
4 <meta charset="utf-8"> |
|
5 <title>Test the web console output - 02</title> |
|
6 <!-- |
|
7 - Any copyright is dedicated to the Public Domain. |
|
8 - http://creativecommons.org/publicdomain/zero/1.0/ |
|
9 --> |
|
10 </head> |
|
11 <body> |
|
12 <p>hello world!</p> |
|
13 <script type="text/javascript"> |
|
14 function testfn1() { return 42; } |
|
15 |
|
16 var testobj1 = { |
|
17 testfn2: function() { return 42; }, |
|
18 }; |
|
19 |
|
20 function testfn3() { return 42; } |
|
21 testfn3.displayName = "testfn3DisplayName"; |
|
22 |
|
23 var array1 = [1, 2, 3, "a", "b", "c", "4", "5"]; |
|
24 |
|
25 var array2 = ["a", document, document.body, document.body.dataset, |
|
26 document.body.classList]; |
|
27 |
|
28 var array3 = [1, window, null, "a", "b", undefined, false, "", -Infinity, testfn3, testobj1, "foo", "bar"]; |
|
29 |
|
30 var array4 = new Array(5); |
|
31 array4.push("test"); |
|
32 array4.push(array4); |
|
33 |
|
34 var typedarray1 = new Int32Array([1, 287, 8651, 40983, 8754]); |
|
35 |
|
36 var set1 = new Set([1, 2, null, array3, "a", "b", undefined, document.head]); |
|
37 set1.add(set1); |
|
38 |
|
39 var testobj2 = {a: "b", c: "d", e: 1, f: "2"}; |
|
40 testobj2.foo = testobj1; |
|
41 testobj2.bar = testobj2; |
|
42 Object.defineProperty(testobj2, "getterTest", { |
|
43 enumerable: true, |
|
44 get: function() { |
|
45 return 42; |
|
46 }, |
|
47 }); |
|
48 |
|
49 var testobj3 = {a: "b", c: "d", e: 1, f: "2", g: true, h: null, i: undefined, |
|
50 j: "", k: document.styleSheets, l: document.body.childNodes, |
|
51 o: new Array(125), m: document.head}; |
|
52 |
|
53 var testobj4 = {a: "b", c: "d"}; |
|
54 Object.defineProperty(testobj4, "nonEnumerable", { value: "hello world" }); |
|
55 |
|
56 var map1 = new Map([["a", "b"], [document.body.children, testobj2]]); |
|
57 map1.set(map1, set1); |
|
58 |
|
59 </script> |
|
60 </body> |
|
61 </html> |