test-result-format-as-string.html 761 B

1234567891011121314151617181920212223242526
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Web Console test: jsterm eval format as a string</title>
  6. <!-- Any copyright is dedicated to the Public Domain.
  7. http://creativecommons.org/publicdomain/zero/1.0/ -->
  8. </head>
  9. <body>
  10. <p>Make sure js eval results are formatted as strings.</p>
  11. <script>
  12. document.querySelector("p").toSource = function() {
  13. var element = document.createElement("div");
  14. element.id = "foobar";
  15. element.textContent = "bug772506_content";
  16. element.setAttribute("onmousemove",
  17. "(function () {" +
  18. " gBrowser._bug772506 = 'foobar';" +
  19. "})();"
  20. );
  21. return element;
  22. };
  23. </script>
  24. </body>
  25. </html>