Open jakemac53 opened 9 years ago
I think what probably makes the most sense here is to rename and generalize the @eventHandler
annotation.
Naming suggestions? Ideally something short and meaningful, @exposeToJs
is all I can really think of off the top of my head right now but I am not a huge fan of it.
Could also just be like @jsPrototype
? That is very explicit about what is going on at least.
@expose
, @export
, @reflect
, @polymerJs
I do like @export, but I am not sure if it is descriptive enough. Maybe that is fine though.
@reflectable
does allow this now, I am going to open a separate issue about static properties
whoops this is not actually resolved
You can do this for methods today with @eventHandler, but the only way to do it for fields is with @property, which makes it a full on polymer property. See https://github.com/dart-lang/polymer_elements/issues/70 for example, the IronA11yKeysBehavior class expects behaviors and elements to set a
keyBindings
object directly on their prototypes, for the most optimal behavior. To support this we would also need proper support for statics.