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

Side by Side Diff: tools/dom/templates/html/dartium/impl_Window.darttemplate

Issue 12259037: Reapply remove setTimeout, take 3. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 part of $LIBRARYNAME;
6
7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
8
9 /**
10 * Executes a [callback] after the immediate execution stack has completed.
11 *
12 * This will cause the callback to be executed after all processing has
13 * completed for the current event, but before any subsequent events.
14 */
15 void setImmediate(TimeoutHandler callback) {
16 _addMicrotaskCallback(callback);
17 }
18
19 /**
20 * Lookup a port by its [name]. Return null if no port is
21 * registered under [name].
22 */
23 lookupPort(String name) {
24 var port = json.parse(document.documentElement.attributes['dart-port:$name'] );
25 return _deserialize(port);
26 }
27
28 /**
29 * Register a [port] on this window under the given [name]. This
30 * port may be retrieved by any isolate (or JavaScript script)
31 * running in this window.
32 */
33 registerPort(String name, var port) {
34 var serialized = _serialize(port);
35 document.documentElement.attributes['dart-port:$name'] = json.stringify(seri alized);
36 }
37
38 /// Checks if _setImmediate is supported.
39 static bool get _supportsSetImmediate => false;
40
41 /// Dartium stub for IE's setImmediate.
42 void _setImmediate(void callback()) {
43 throw new UnsupportedError('setImmediate is not supported');
44 }
45
46 $!MEMBERS
47 }
OLDNEW
« 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