block-html-html-3-dyn.html 621 B

1234567891011121314151617181920212223242526272829303132333435
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <head>
  4. <style type="text/css">
  5. html, body {
  6. margin: 0; padding: 0;
  7. }
  8. html {
  9. background-color: white;
  10. margin: 10px 0;
  11. }
  12. body {
  13. background-color: red;
  14. margin: 20px 0;
  15. }
  16. div {
  17. display: none;
  18. background-color: green;
  19. margin: 40px 0;
  20. height: 100px;
  21. }
  22. </style>
  23. <script type="text/javascript">
  24. function test() {
  25. document.getElementsByTagName('div')[0].style.display = 'block';
  26. document.documentElement.removeAttribute('class');
  27. }
  28. document.addEventListener('MozReftestInvalidate', test, false);
  29. </script>
  30. </head>
  31. <body>
  32. <div></div>
  33. </body>
  34. </html>