summaryrefslogtreecommitdiffstats
path: root/layout/reftests/view-source/view-source-image.html
blob: d9b29c98e3de2dc7f805e11321c25383eaa5f4a7 (plain)
1
2
3
4
5
6
7
8
<script>
  var url = document.location.href;
  var imageUrl = url.replace(/[/][^/]*$/, "/blue-circle-16x16.png");
  var viewSourceImageUrl = "view-source:" + imageUrl;
  var html = "<iframe src='#url#'></iframe>".replace(/#url#/, viewSourceImageUrl);
  document.write(html);
</script>