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-image-display-none-loading.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="help" href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element">
<!--
Based on step 2 of the spec algorithm:
"... if the element is not being rendered,
then jump to the step below labeled fallback."
-->
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
const t = async_test(
"Test that object image not displayed is not loaded unnecessarily."
);
function obj_onload() {
t.unreached_func(
"Object image not displayed on screen should not load."
)();
}
t.step_timeout(() => {
t.done();
}, 2000);
</script>
<style>
#target {
display: none;
}
</style>
<object
data="/images/red.png"
id="target"
onload="obj_onload();"
type="image/png"
>
Fallback Text
</object>