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 ' |