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

Unified Diff: pkg/polymer/lib/src/events.dart

Issue 317013007: Detect and wrap JS-CustomEvents if applicable. Include created_watcher and (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | « pkg/pkg.status ('k') | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/events.dart
diff --git a/pkg/polymer/lib/src/events.dart b/pkg/polymer/lib/src/events.dart
index 503445fbf827ac91cb9ba0ea4a97d555adb80c2c..2ca037c2bb8632598c8c7e3852b81f4bafb7f281 100644
--- a/pkg/polymer/lib/src/events.dart
+++ b/pkg/polymer/lib/src/events.dart
@@ -57,7 +57,15 @@ abstract class PolymerEventBindings {
}
if (controller is Polymer) {
- var args = [e, e.detail, e.currentTarget];
+ var detail = null;
+ if (e is CustomEvent) {
+ detail = e.detail;
+ // TODO(sigmund): this shouldn't be necessary. See issue 19315.
+ if (detail == null) {
+ detail = new JsObject.fromBrowserObject(e)['detail'];
+ }
+ }
+ var args = [e, detail, e.currentTarget];
controller.dispatchMethod(controller, method, args);
} else {
throw new StateError('controller $controller is not a '
« no previous file with comments | « pkg/pkg.status ('k') | pkg/polymer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698