input-text-node-invalidation-on-value-change.html 375 B

12345678910111213141516
  1. <!DOCTYPE html><html><head><style>
  2. * {
  3. font: 20px 'SerenitySans';
  4. }
  5. input {
  6. width: 200px;
  7. }
  8. </style></head><body><input id="foo">
  9. <script>
  10. let foo = document.getElementById("foo");
  11. foo.value = "FAIL";
  12. document.body.offsetWidth; // Force a layout
  13. document.addEventListener("DOMContentLoaded", function() {
  14. foo.value = "PASS";
  15. });
  16. </script>