mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
19 lines
636 B
HTML
19 lines
636 B
HTML
<html>
|
|
<link rel="import" href="../resources/chai.html" />
|
|
<link rel="import" href="../resources/mocha.html" />
|
|
<script>
|
|
describe('MutationObserver', function() {
|
|
it('should pass the callback and observer arguments', function(done) {
|
|
var mutationObserver = new MutationObserver(function(mutations, observer) {
|
|
assert.equal(this, mutationObserver);
|
|
assert.equal(mutationObserver, observer);
|
|
done();
|
|
});
|
|
var div = document.createElement('div');
|
|
mutationObserver.observe(div, {attributes: true});
|
|
div.setAttribute('foo', 'bar');
|
|
});
|
|
});
|
|
</script>
|
|
</html>
|