Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE HTML>
<meta charset="utf-8">
<title>Document base URL adopted img test</title>
<link rel="match" href="document-base-url-ref.html">
<base href="resources/" />
<iframe></iframe>
<script>
var iframe = document.querySelector('iframe');
var i = iframe.contentDocument.createElement('img');
i.src = "cat.jpg";
document.body.appendChild(i);
iframe.remove();
</script>