Closed zoechi closed 8 years ago
Presumably, this is throwing here https://github.com/bwu-dart-playground/bug_repo/blob/master/event_impl_instead_of_custom_event/web/context_menu.dart#L28. The issue afaik is actually that fire
does not fire a real CustomEvent
(polymer js mimics them). You would need to change that type to just Event
, and then call convertToDart(event)
to get a CustomEvent
.
Or, if you just use @Observe(ContextMenu.contextMenuSelect)
annotation on a method then it should be handled for you.
Thanks for the info!
So is this "as designed"? Then the issue can be closed.
I changed fire
to dispatchEvent
. The events are listened to by Dart code only anyway.
Description
Run the code in this repo https://github.com/bwu-dart-playground/bug_repo/blob/master/event_impl_instead_of_custom_event/web/context_menu.dart#L31
The commented out line
fire(...)
causes the exception The active linedispatchEvent(...)
works fineExpected Results
`fire()´ to not cause this type conflict
Actual Results
Not sure if it's a bug or a limitation of the way Polymer is wrapped.