1205923-1.html 849 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <!DOCTYPE html>
  2. <html class="reftest-wait">
  3. <body>
  4. </body>
  5. <script>
  6. function createImage(loadHandler) {
  7. var newImage = new Image;
  8. newImage.id = "thepreviewimage";
  9. newImage.setAttribute("src", "unsized-svg.svg");
  10. if (loadHandler) {
  11. newImage.onload = loadHandler;
  12. }
  13. // Query width & height, and display them in document:
  14. physWidth = newImage.width;
  15. physHeight = newImage.height;
  16. document.documentElement.innerHTML +=
  17. physWidth + " x " + physHeight + "<br>";
  18. }
  19. function part2() {
  20. // Load image again:
  21. createImage();
  22. // End the crashtest.
  23. document.documentElement.removeAttribute("class");
  24. }
  25. function startTest() {
  26. // Trigger image load, and call part2() when it's loaded:
  27. createImage(part2);
  28. }
  29. startTest();
  30. </script>
  31. </html>