Chromium Code Reviews| Index: tools/dom/src/native_DOMImplementation.dart |
| diff --git a/tools/dom/src/native_DOMImplementation.dart b/tools/dom/src/native_DOMImplementation.dart |
| index 2c82dddb7592a1dcc8261af5a4dfba4a184b1459..e6b5c15c3a1949b65e7f0dde61d0408bcc176b43 100644 |
| --- a/tools/dom/src/native_DOMImplementation.dart |
| +++ b/tools/dom/src/native_DOMImplementation.dart |
| @@ -411,6 +411,20 @@ get _pureIsolateTimerFactoryClosure => |
| throw new UnimplementedError("Timers on background isolates " |
| "are not supported in the browser")); |
| +final _enqueueImmediateHelperNode = new DivElement(); |
| +get _enqueueImmediateFactoryClosure => (void callback()) { |
| + new MutationObserver((changes, observer) { |
| + observer.disconnect(); |
| + callback(); |
| + }).observe(_enqueueImmediateHelperNode, childList: true, attributes: true); |
| + _enqueueImmediateHelperNode.attributes.clear(); |
|
blois
2013/10/03 16:54:29
The attributes getter isn't as lightweight as it s
Anders Johnsen
2013/10/10 14:48:54
Done.
|
| + _enqueueImmediateHelperNode.attributes["text"] = " "; |
| +}; |
| + |
| +get _pureIsolateEnqueueImmediateFactoryClosure => ((void callback()) => |
| + throw new UnimplementedError("runAsync in background isolates " |
| + "are not supported in the browser")); |
| + |
| void _initializeCustomElement(Element e) { |
| _Utils.initializeCustomElement(e); |
| } |