OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <script src="../../resources/js-test.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <script> | 8 <script> |
9 | 9 |
10 description("Tests that mutating an elements attribute map during DOMSubtreeModi
fied event dispatch doesn't break Node.normalize. Passes if it doesn't crash."); | 10 description("Tests that mutating an elements attribute map during DOMSubtreeModi
fied event dispatch doesn't break Node.normalize. Passes if it doesn't crash."); |
11 | 11 |
12 var el = document.createElement('div') | 12 var el = document.createElement('div') |
13 el.setAttribute('a', 'a') | 13 el.setAttribute('a', 'a') |
14 el.setAttribute('b', 'b') | 14 el.setAttribute('b', 'b') |
15 el.attributes[1].appendChild(document.createTextNode()) | 15 el.attributes[1].appendChild(document.createTextNode('')) |
16 el.attributes[1].addEventListener('DOMSubtreeModified', function() { el.removeAt
tribute('b') }, false) | 16 el.attributes[1].addEventListener('DOMSubtreeModified', function() { el.removeAt
tribute('b') }, false) |
17 el.normalize() | 17 el.normalize() |
18 | 18 |
19 </script> | 19 </script> |
20 </body> | 20 </body> |
21 </html> | 21 </html> |
OLD | NEW |