Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /resize-observer/calculate-depth-for-node.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<div id="host"></div>
<script>
let didSeeError = false;
window.onerror = (message, source, lineno, colno, error) => {
didSeeError = true;
}
async_test(t => {
let host = document.querySelector('#host');
let observer = new ResizeObserver(t.step_func(() => {
let root = host.attachShadow({mode:'open'});
let child = root.appendChild(document.createElement('div'));
new ResizeObserver(() => {}).observe(child);
requestAnimationFrame(t.step_func_done(() => { assert_false(didSeeError); }));
}));
observer.observe(host);
}, '"Calculate depth for node" algorithm with Shadow DOM');
</script>
</body>