test_bug944847.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE HTML>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=944847
  5. -->
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Test for Bug 944847</title>
  9. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  10. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  11. <script type="application/javascript">
  12. /** Test for Bug 944847 **/
  13. var e1 = document.createElement("div");
  14. is(e1.onclick, null);
  15. e1.setAttribute("onclick", "");
  16. isnot(e1.onclick, null);
  17. var e2 = document.implementation.createHTMLDocument(null, null).createElement("div");
  18. is(e2.onclick, null);
  19. e2.setAttribute("onclick", "");
  20. is(e2.onclick, null);
  21. var e3 = document.createElement("div");
  22. is(e3.onclick, null);
  23. e3.setAttribute("onclick", "");
  24. e2.ownerDocument.adoptNode(e3);
  25. is(e3.onclick, null);
  26. </script>
  27. </head>
  28. <body>
  29. <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=944847">Mozilla Bug 944847</a>
  30. <p id="display"></p>
  31. <div id="content" style="display: none">
  32. </div>
  33. <pre id="test">
  34. </pre>
  35. </body>
  36. </html>