| Index: tools/dom/src/native_DOMImplementation.dart
|
| diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart
|
| index 7b123486440d280197e60513d6faaf667e81d774..982a50b4069303db1ed1bfd9dc7dc2dc5d9d1f20 100644
|
| --- a/tools/dom/src/native_DOMImplementation.dart
|
| +++ b/tools/dom/src/native_DOMImplementation.dart
|
| @@ -537,10 +537,14 @@ class _ScheduleImmediateHelper {
|
| Function _callback;
|
|
|
| _ScheduleImmediateHelper() {
|
| - // Mutation events get fired as soon as the current event stack is unwound
|
| - // so we just make a dummy event and listen for that.
|
| - _observer = new MutationObserver(_handleMutation);
|
| - _observer.observe(_div, attributes: true);
|
| + // Run in the root-zone as the DOM callback would otherwise execute in the
|
| + // current zone.
|
| + Zone.ROOT.run(() {
|
| + // Mutation events get fired as soon as the current event stack is unwound
|
| + // so we just make a dummy event and listen for that.
|
| + _observer = new MutationObserver(_handleMutation);
|
| + _observer.observe(_div, attributes: true);
|
| + });
|
| }
|
|
|
| void _schedule(callback) {
|
|
|