Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/cssom-view/resize-event-on-initial-layout-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset=utf-8>
<meta name="viewport" content="width=device-width">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script>
promise_test(async t => {
let gotResizeEvent = false;
on_event(window, 'resize', () => gotResizeEvent = true);
await new Promise(resolve => requestAnimationFrame(resolve));
await new Promise(resolve => requestAnimationFrame(resolve));
assert_false(gotResizeEvent, 'resize event should not be fired');
}, 'resize events are not fired on the initial layout');
</script>