dfilatov / vidom

Library to build UI based on virtual DOM
MIT License
415 stars 16 forks source link

Why are you passing DOM event handlers via attrs ? #40

Closed ghost closed 9 years ago

ghost commented 9 years ago

Why are you passing DOM event handlers via attrs ?

As in the default DOM specs, we have onClick, onMouce etc. This is not supported by you, or I'm wrong? So overriding this with DOM event handlers on attrs are going against the DOM specs. Considered having it's own Event variable?

Maybe this can give you some ideas: https://github.com/jhudson8/react-events

dfilatov commented 9 years ago

The event handlers are separated from usual attributes inside engine.

dfilatov commented 9 years ago

Sorry, I can't understand your question. Could you give more details?

dfilatov commented 9 years ago

Actually REACT does: https://facebook.github.io/react/docs/events.html

dfilatov commented 9 years ago

I have the similar registry: https://github.com/dfilatov/vidom/blob/master/lib/client/events/attrsToEvents.js