Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/forms/the-select-element/customizable-select/select-option-images.tentative.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<meta name=fuzzy content="maxDifference=0-41;totalPixels=0-2">
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=match href="select-option-images-ref.html">
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
select, select::picker(select) {
appearance: base-select;
}
</style>
<select>
<button>button</button>
<option><img alt="" src="/images/green-16x16.png">green-16x16</option>
<option class=two><img alt="" src="/images/red-16x16.png">red-16x16</option>
</select>
<script>
(async () => {
await test_driver.bless();
const select = document.querySelector('select');
select.showPicker();
// <img> elements should still be rendered after removing and re-appending
const option = document.querySelector('option.two');
option.remove();
select.appendChild(option);
document.documentElement.classList.remove('reftest-wait');
})();
</script>