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:
- /html/semantics/embedded-content/the-object-element/object-in-display-none-load-event.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<meta charset=utf-8>
<title>Test that an object in a display:none subtree does not block the load event</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
let objLoaded = false;
function objOnload() {
objLoaded = true;
}
async_test(t => {
addEventListener('load', t.step_func_done(() => {
assert_true(!!document.querySelector('object'));
assert_false(objLoaded);
}));
}, 'Load event triggered on window without the object element load');
</script>
<div style="display: none;">
<object data="data:text/html," onload="objOnload()"></object>
</div>
</html>