On Thu, Jun 30, 2016 at 11:42 PM, Ignacio Baca Moreno-Torres <
igna...@bacamt.com> wrote:
> Yep, not sure why... but I just try again and the parameter is used
> correctly by the codeserver, so it works as you said. When you said 'you
> are implementing a native JsType' you are talking about the J
Thanks, now makes sense. I get confused with the JsFunction JsType(native)
because elemental2 has some callbacks as JsFunction and others as
JsType(native), now an actual elemental2 question; what criteria is used to
apply JsFunction (ex. elemental2.Node.AddEventListenerCallback) instead of
JsT
JsType example is: elemental2.EventListener.
On Friday, July 1, 2016 at 12:10:04 PM UTC+2, Ignacio Baca Moreno-Torres
wrote:
>
> Thanks, now makes sense. I get confused with the JsFunction JsType(native)
> because elemental2 has some callbacks as JsFunction and others as
> JsType(native), now a
> Thanks, now makes sense. I get confused with the JsFunction JsType(native)
> because elemental2 has some callbacks as JsFunction and others as
> JsType(native), now an actual elemental2 question; what criteria is used to
> apply JsFunction (ex. elemental2.Node.AddEventListenerCallback) inste
Closure extern definition uses a union type here:
https://github.com/google/closure-compiler/blob/master/externs/browser/w3c_event.js#L34
So it accepts either EventListener interface or a function.
When we see a union type, we generate overloads for each type so Elemental
should provide overloads