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

Unified Diff: tools/dom/templates/html/dartium/impl_Window.darttemplate

Issue 12212200: "Reverting 18531" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
Index: tools/dom/templates/html/dartium/impl_Window.darttemplate
diff --git a/tools/dom/templates/html/dartium/impl_Window.darttemplate b/tools/dom/templates/html/dartium/impl_Window.darttemplate
new file mode 100644
index 0000000000000000000000000000000000000000..3c4125be47870352342ec1eb8149a12fec37206f
--- /dev/null
+++ b/tools/dom/templates/html/dartium/impl_Window.darttemplate
@@ -0,0 +1,47 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of $LIBRARYNAME;
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+ /**
+ * Executes a [callback] after the immediate execution stack has completed.
+ *
+ * This will cause the callback to be executed after all processing has
+ * completed for the current event, but before any subsequent events.
+ */
+ void setImmediate(TimeoutHandler callback) {
+ _addMicrotaskCallback(callback);
+ }
+
+ /**
+ * Lookup a port by its [name]. Return null if no port is
+ * registered under [name].
+ */
+ lookupPort(String name) {
+ var port = json.parse(document.documentElement.attributes['dart-port:$name']);
+ return _deserialize(port);
+ }
+
+ /**
+ * Register a [port] on this window under the given [name]. This
+ * port may be retrieved by any isolate (or JavaScript script)
+ * running in this window.
+ */
+ registerPort(String name, var port) {
+ var serialized = _serialize(port);
+ document.documentElement.attributes['dart-port:$name'] = json.stringify(serialized);
+ }
+
+ /// Checks if _setImmediate is supported.
+ static bool get _supportsSetImmediate => false;
+
+ /// Dartium stub for IE's setImmediate.
+ void _setImmediate(void callback()) {
+ throw new UnsupportedError('setImmediate is not supported');
+ }
+
+$!MEMBERS
+}
« no previous file with comments | « tools/dom/templates/html/dart2js/impl_Window.darttemplate ('k') | tools/dom/templates/html/impl/impl_Window.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698