OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Changes to the 'async' attribute are reflected in the async prope
rty</title> |
| 5 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> |
| 6 <meta description="This test ensures changes to the 'async' attribute ar
e reflected in the async property." /> |
| 7 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> |
| 8 <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-scrip
t-async"/> |
| 9 <script src="../../../../../../resources/testharness.js"></script> |
| 10 <script src="../../../../../../resources/testharnessreport.js"></script> |
| 11 </head> |
| 12 <body> |
| 13 <div id=log></div> |
| 14 <script type="text/javascript"> |
| 15 test(function() { |
| 16 var s = document.createElement("script"); |
| 17 s.async = false; |
| 18 s.setAttribute('async', ''); /*Should change s.async to true*/ |
| 19 assert_true(s.async) |
| 20 }, "Test 'async' attribute are reflected in the async property with se
tAttribute"); |
| 21 |
| 22 test(function() { |
| 23 var s = document.createElement("script"); |
| 24 s.async = false; |
| 25 s.setAttribute('async', ''); /*Should change s.async to true*/ |
| 26 s.removeAttribute('async'); /*Should change s.async to false*/ |
| 27 assert_false(s.async) |
| 28 }, "Test 'async' attribute are reflected in the async property with re
moveAttribute"); |
| 29 </script> |
| 30 </body> |
| 31 </html> |
OLD | NEW |