OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <body> |
| 3 |
| 4 <script id="dart" type="application/dart"> |
| 5 import 'dart:html'; |
| 6 |
| 7 void main() { |
| 8 var mutationOccurred = false; |
| 9 var observer = new MutationObserver((e, o) { |
| 10 print('mutation occurred'); |
| 11 mutationOccurred = true; |
| 12 }); |
| 13 |
| 14 var div = new DivElement(); |
| 15 document.body.append(div); |
| 16 observer.observe(div, attributes: true); |
| 17 div.hidden = true; |
| 18 |
| 19 print('sending something to the console'); |
| 20 |
| 21 if (mutationOccurred) { |
| 22 window.console.log('mutation occurred when it should not have'); |
| 23 } |
| 24 window.console.log('done with main'); |
| 25 } |
| 26 </script> |
| 27 |
| 28 <script> |
| 29 if (window.testRunner) { |
| 30 // Wait until after the mutation observer is done. |
| 31 window.setTimeout(window.testRunner.dumpAsText, 10); |
| 32 } |
| 33 </script> |
| 34 |
| 35 </body> |
| 36 </html> |
OLD | NEW |