test-console-api-stackframe.html 730 B

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE HTML>
  2. <html dir="ltr" lang="en">
  3. <head>
  4. <meta charset="utf8">
  5. <!--
  6. - Any copyright is dedicated to the Public Domain.
  7. - http://creativecommons.org/publicdomain/zero/1.0/
  8. -->
  9. <title>Test for bug 920116 - stacktraces for console API messages</title>
  10. <script>
  11. function firstCall() {
  12. secondCall();
  13. }
  14. function secondCall() {
  15. thirdCall();
  16. }
  17. function thirdCall() {
  18. console.log("foo-log");
  19. console.error("foo-error");
  20. console.exception("foo-exception");
  21. console.assert("red" == "blue", "foo-assert");
  22. }
  23. window.onload = firstCall;
  24. </script>
  25. </head>
  26. <body>
  27. <p>Hello world!</p>
  28. </body>
  29. </html>