Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /editing/crashtests/change-input-type-of-focused-text-control-and-make-it-editing-host.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
document.addEventListener("DOMContentLoaded", () => {
const input = document.createElement("input");
document.documentElement.appendChild(input);
input.focus();
input.type = "file";
input.getBoundingClientRect();
input.setAttribute("contenteditable", "true");
});
</script>
<body></body>
</html>