diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-img-element/adopt-from-image-document.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/the-img-element/adopt-from-image-document.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/adopt-from-image-document.html b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/adopt-from-image-document.html new file mode 100644 index 0000000000..30729fc81c --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/adopt-from-image-document.html @@ -0,0 +1,16 @@ +<!doctype html> +<title>Adopt img from image document</title> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-img-element"> +<link rel="match" href="document-base-url-ref.html"> +<!-- Counteract any style added by the image document --> +<style>img { width: initial; height: initial; }</style> +<iframe></iframe> +<script> + var iframe = document.querySelector('iframe'); + iframe.onload = function() { + let img = iframe.contentDocument.body.firstChild; + document.body.appendChild(img); + iframe.remove(); + }; + iframe.src = 'resources/cat.jpg'; +</script> |