summaryrefslogtreecommitdiffstats
path: root/dom/serviceworkers/test/fetch/hsts/image.html
blob: 7036ea954eb4e583fd346232ba6b32d730b45baa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>
<script>
onload=function(){
  var img = new Image();
  img.src = "http://example.com/tests/dom/serviceworkers/test/fetch/hsts/image-20px.png";
  img.onload = function() {
    window.parent.postMessage({status: "image", data: img.width}, "*");
  };
  img.onerror = function() {
    window.parent.postMessage({status: "image", data: "error"}, "*");
  };
};
</script>