Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Unified Diff: tools/dom/src/native_DOMImplementation.dart

Issue 25722010: Add support for micro-tasks in Dartium. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698