event-disabled-dynamic.html (972B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>Test that disabled is honored immediately in presence of dynamic changes</title> 4 <link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io"> 5 <link rel="author" title="Andreas Farre" href="mailto:afarre@mozilla.com"> 6 <link rel="help" href="https://html.spec.whatwg.org/multipage/#enabling-and-disabling-form-controls:-the-disabled-attribute"> 7 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1405087"> 8 <script src=/resources/testharness.js></script> 9 <script src=/resources/testharnessreport.js></script> 10 <input type="button" value="Click" disabled> 11 <script> 12 async_test(t => { 13 // NOTE: This test will timeout if it fails. 14 window.addEventListener('load', t.step_func(() => { 15 let e = document.querySelector('input'); 16 e.disabled = false; 17 e.onclick = t.step_func_done(() => {}); 18 e.click(); 19 })); 20 }, "disabled is honored properly in presence of dynamic changes"); 21 </script>