blob: 4a1224a1815e1b3c0492eb0d5c252c25292673ef [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../../../resources/js-test-pre.js"></script>
<script>
window.jsTestIsAsync = true;
description('Verifies that MutationObserver is passed to the callback as expected.');
function mutationCallback(mutations, observer) {
window.thisArgument = this;
window.argument2 = observer;
shouldBe('thisArgument', 'mutationObserver');
shouldBe('argument2', 'mutationObserver');
finishJSTest();
}
var mutationObserver = new MutationObserver(mutationCallback);
var div = document.createElement('div');
mutationObserver.observe(div, {attributes: true});
div.setAttribute('foo', 'bar');
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>