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

Unified Diff: lib/html/src/frog_DOMImplementation.dart

Issue 10484004: Fix bug in Dromaeo to use the proper generated html file. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Support postMessage in dart2js for dart:html Created 8 years, 7 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 | « lib/html/frog/html_frog.dart ('k') | samples/third_party/dromaeo/Suites.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/src/frog_DOMImplementation.dart
diff --git a/lib/html/src/frog_DOMImplementation.dart b/lib/html/src/frog_DOMImplementation.dart
index c77f271c3b2767c358ced0d8851b084d4858724a..63dc3ae2688498cb3031fe77e5bdc4e1d22b5e3d 100644
--- a/lib/html/src/frog_DOMImplementation.dart
+++ b/lib/html/src/frog_DOMImplementation.dart
@@ -27,12 +27,23 @@ class _DOMWindowCrossFrameImpl implements Window {
String targetOrigin,
[List messagePorts = null]) {
if (messagePorts == null) {
- _window.postMessage(message, targetOrigin);
+ _postMessage2(_window, message, targetOrigin);
} else {
- _window.postMessage(message, targetOrigin, messagePorts);
+ _postMessage3(_window, message, targetOrigin, messagePorts);
}
}
+ // TODO(vsm): This is a hack to workaround dartbug.com/3175. We
+ // need a more robust convention to invoke JS methods on the
+ // underlying window.
+ static void _postMessage2(win, message, targetOrigin) native """
+ win.postMessage(message, targetOrigin);
+""";
+
+ static void _postMessage3(win, message, targetOrigin, messagePorts) native """
+ win.postMessage(message, targetOrigin, messagePorts);
+""";
+
// Implementation support.
_DOMWindowCrossFrameImpl(this._window);
« no previous file with comments | « lib/html/frog/html_frog.dart ('k') | samples/third_party/dromaeo/Suites.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698