Files
sousa-gecko/testing/web-platform/tests/intersection-observer/resources/transformed-iframe-subframe.html
T
Kiet Ho c2806e3af1 Bug 2044929 [wpt PR 60379] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=315779, a=testonly
Automatic update from web-platform-tests
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=315779

--

wpt-commits: a61ae98d79237f84e9968b1363aac61db31ccf87
wpt-pr: 60379
2026-06-09 18:47:49 +00:00

29 lines
516 B
HTML

<!DOCTYPE html>
<style>
body {
margin: 0;
padding: 0;
}
#target {
position: absolute;
height: 150px;
width: 150px;
background-color: green;
}
</style>
<div id="target"></div>
<script>
let observer = new IntersectionObserver((observations) => {
const lastObservation = observations[observations.length - 1];
window.top.postMessage({
isIntersecting: lastObservation.isIntersecting
}, "*");
});
observer.observe(document.getElementById("target"));
</script>