Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /intersection-observer/hidden-iframe-target-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="test-wait">
<title>Don't crash when observing a target inside a hidden iframe</title>
<iframe id="f" hidden></iframe>
<script>
window.addEventListener("load", () => {
const observer = new IntersectionObserver(() => {
document.documentElement.className = "";
});
observer.observe(f.contentDocument.documentElement);
});
</script>
</html>