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-datalist-element/input-text-datalist-removal.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=reftest-wait>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=match href="input-text-focused-ref.html">
<link rel=assert title="Text inputs should reset their datalist related appearance when the list attribute is removed.">
<input list=mydatalist>
<datalist id=mydatalist>
<option>option</option>
</datalist>
<script>
const input = document.querySelector('input');
(async () => {
input.focus();
await new Promise(requestAnimationFrame);
input.removeAttribute('list');
await new Promise(requestAnimationFrame);
input.focus();
await new Promise(requestAnimationFrame);
document.documentElement.classList.remove('reftest-wait');
})();
</script>