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

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

Issue 22263002: Adding API to remove send ports from Window. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_Window.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Window.darttemplate b/tools/dom/templates/html/impl/impl_Window.darttemplate
index 4c78373acbd2b8834a8ed34fbcdba02983461557..2e9e57b0496c6fdc82fb7df23a9da85b76d27367 100644
--- a/tools/dom/templates/html/impl/impl_Window.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Window.darttemplate
@@ -48,6 +48,15 @@ $endif
}
/**
+ * Deregister a [port] on this window under the given [name]. This
+ * port may be retrieved by any isolate (or JavaScript script)
+ * running in this window.
+ */
+ void deregisterPort(String name) {
+ document.documentElement.attributes.remove('dart-port:$name');
+ }
+
+ /**
* Returns a Future that completes just before the window is about to
* repaint so the user can draw an animation frame.
*
@@ -283,9 +292,9 @@ $!MEMBERS
}
$if DART2JS
- int get scrollX => JS('bool', '("scrollX" in #)', this) ? JS('int',
+ int get scrollX => JS('bool', '("scrollX" in #)', this) ? JS('int',
'#.scrollX', this) : document.documentElement.scrollLeft;
- int get scrollY => JS('bool', '("scrollY" in #)', this) ? JS('int',
+ int get scrollY => JS('bool', '("scrollY" in #)', this) ? JS('int',
'#.scrollY', this) : document.documentElement.scrollTop;
$endif
}
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698