diff options
Diffstat (limited to 'testing/web-platform/tests/intersection-observer/resources/nested-cross-origin-grand-child-iframe.html')
-rw-r--r-- | testing/web-platform/tests/intersection-observer/resources/nested-cross-origin-grand-child-iframe.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testing/web-platform/tests/intersection-observer/resources/nested-cross-origin-grand-child-iframe.html b/testing/web-platform/tests/intersection-observer/resources/nested-cross-origin-grand-child-iframe.html new file mode 100644 index 0000000000..3676760e35 --- /dev/null +++ b/testing/web-platform/tests/intersection-observer/resources/nested-cross-origin-grand-child-iframe.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<div id="target" style="height: 100px; background-color: green;"></div> +<script> +const observer = new IntersectionObserver(records => { + records.forEach(record => { + if (record.isIntersecting) { + window.top.postMessage(record.isIntersecting, "*"); + } + }); +}, {}); +observer.observe(target); +window.addEventListener("load", () => { + window.top.postMessage("ready", "*"); +}); +</script> |