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-embed-element/embed-represent-nothing-04.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<title>HTML Test: The embed element represents nothing when it is never being rendered</title>
<link rel="author" title="Peng Zhou" href="mailto:zhoupeng.1996@bytedance.com">
<meta name="assert" content="Check if the embed element represents nothing when it is never being rendered">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#target {
display: none;
}
</style>
<body>
<script>
async_test(t => {
window.childLoaded = false;
addEventListener('load', t.step_func_done(() => {
assert_true(!!document.querySelector('embed'));
assert_false(window.childLoaded);
}));
}, 'ensure the element represents nothing');
</script>
<embed id="target" src="embed-iframe.html"></embed>
</body>