Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<link rel="author" title="Squarespace" href="https://www.squarespace.com/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<video
id="target"
src="/media/A4.webm?pipe=trickle(d2)"
loading="lazy"
></video>
<script>
async_test(t => {
const video = document.getElementById("target");
window.addEventListener("load", t.step_func_done(() => {
assert_less_than(
video.readyState,
video.HAVE_CURRENT_DATA,
"Video should not have finished loading before window.onload fired"
);
}));
}, "Video with loading=lazy does not delay window onload event");
</script>