summaryrefslogtreecommitdiffstats
path: root/dom/html/reftests/responsive-image-load-shortcircuit.html
blob: 1cfb92cb2015d6d18ebafc01f0b781f6818dcf43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<html class="reftest-wait">
<iframe srcdoc="<img srcset=red.png>" width="150px"></iframe>
<script>
  var iframe = document.querySelector('iframe');
  iframe.onload = function() {
    var doc = iframe.contentDocument;
    var img = doc.querySelector('img');
    img.srcset = "pass.png";
    iframe.width = "300px";
    img.onload = function() {
      document.documentElement.classList.remove('reftest-wait');
    };
  }
</script>
</html>