Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/set-input-value-of-editing-host-after-changing-type.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
document.addEventListener("DOMContentLoaded", () => {
const input = document.querySelector("input");
input.focus();
input.type = "text";
input.value = "new value";
}, {once: true});
</script>
</head>
<body><input type="button" contenteditable></body>
</html>