| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <link rel="import" href="../resources/chai.html" /> | |
| 3 <link rel="import" href="../resources/mocha.html" /> | |
| 4 <script> | |
| 5 describe('MutationRecord', function() { | |
| 6 it('should be exposed on window but not constructable', function() { | |
| 7 assert.ok(window.MutationRecord); | |
| 8 assert.equal(typeof MutationRecord, "function"); | |
| 9 assert.throw(function() { | |
| 10 new MutationRecord | |
| 11 }, TypeError); | |
| 12 | |
| 13 var div = document.createElement('div'); | |
| 14 var observer = new MutationObserver(function(){}); | |
| 15 observer.observe(div, {attributes: true}); | |
| 16 div.id = 'foo'; | |
| 17 var record = observer.takeRecords()[0]; | |
| 18 assert.ok(record instanceof MutationRecord); | |
| 19 }); | |
| 20 }); | |
| 21 </script> | |
| 22 </html> | |
| OLD | NEW |