blob: 2232769cfdd40361797dc668cc0fa191cbf60521 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<script>
description('MutationRecord should be exposed on window but not constructable');
shouldBeNonNull('window.MutationRecord');
shouldBe('typeof MutationRecord', '"function"');
shouldThrow('new MutationRecord');
var div = document.createElement('div');
var observer = new MutationObserver(function(){});
observer.observe(div, {attributes: true});
div.id = 'foo';
var record = observer.takeRecords()[0];
shouldBeTrue('record instanceof MutationRecord');
</script>