test-console-output-02.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. var testobj1 = {
  16. testfn2: function() { return 42; },
  17. };
  18. function testfn3() { return 42; }
  19. testfn3.displayName = "testfn3DisplayName";
  20. var array1 = [1, 2, 3, "a", "b", "c", "4", "5"];
  21. var array2 = ["a", document, document.body, document.body.dataset,
  22. document.body.classList];
  23. var array3 = [1, window, null, "a", "b", undefined, false, "", -Infinity, testfn3, testobj1, "foo", "bar"];
  24. var array4 = new Array(5);
  25. array4.push("test");
  26. array4.push(array4);
  27. var typedarray1 = new Int32Array([1, 287, 8651, 40983, 8754]);
  28. var set1 = new Set([1, 2, null, array3, "a", "b", undefined, document.head]);
  29. set1.add(set1);
  30. var bunnies = new String("bunnies")
  31. var weakset = new WeakSet([bunnies, document.head]);
  32. var testobj2 = {a: "b", c: "d", e: 1, f: "2"};
  33. testobj2.foo = testobj1;
  34. testobj2.bar = testobj2;
  35. Object.defineProperty(testobj2, "getterTest", {
  36. enumerable: true,
  37. get: function() {
  38. return 42;
  39. },
  40. });
  41. var testobj3 = {a: "b", c: "d", e: 1, f: "2", g: true, h: null, i: undefined,
  42. j: "", k: document.styleSheets, l: document.body.childNodes,
  43. o: new Array(125), m: document.head};
  44. var testobj4 = {a: "b", c: "d"};
  45. Object.defineProperty(testobj4, "nonEnumerable", { value: "hello world" });
  46. var map1 = new Map([["a", "b"], [document.body.children, testobj2]]);
  47. map1.set(map1, set1);
  48. var weakmap = new WeakMap([[bunnies, 23], [document.body.children, testobj2]]);
  49. </script>
  50. </body>
  51. </html>