dart-archive / custom-element-apigen

Tool to generate Dart APIs for polymer custom elements written in Javascript
BSD 3-Clause "New" or "Revised" License
13 stars 13 forks source link

Generate getters for events #3

Open sigmundch opened 10 years ago

sigmundch commented 10 years ago

See https://github.com/dart-lang/core-elements/issues/79

quote:

like

  async.Stream<dom.CustomEvent> get onPolymerActivate =>
      PolymerSelector._onPolymerActivate.forTarget(this);

  static const dom.EventStreamProvider<dom.CustomEvent> _onPolymerActivate =
      const dom.EventStreamProvider<dom.CustomEvent>('polymer-activate');

see also this discussion https://groups.google.com/a/dartlang.org/forum/#!topic/web/_FDeF95uj4g

for a complete example see https://github.com/bwu-dart/polymer_elements/blob/master/lib/polymer_selector/polymer_selector.dart#L210-L214

sigmundch commented 10 years ago

see also https://github.com/dart-lang/core-elements/issues/16

jakemac53 commented 9 years ago

Lets revive this since events are often specified for elements now, and I believe hydroysis already parses them for us :)