
This fixes an issue where programmatically changing the value of an input element wasn't reflected visually.
9 lines
254 B
HTML
9 lines
254 B
HTML
<input id="foo">
|
|
<script>
|
|
let foo = document.getElementById("foo");
|
|
foo.value = "FAIL";
|
|
document.body.offsetWidth; // Force a layout
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
foo.value = "PASS";
|
|
});
|
|
</script>
|