derek/yui3-1 — comment on commit f29d0fcc86c0e5ec9f98a4a12b881fae0ebd7d42
File: src/button/js/base.js line 172
By derek:

## Problem

Y.Button.prototype.on needs to support custom `Y.Attribute` change events (handled by `Y.EventTarget.prototype.on`). But at the same time, to meet user expectation for being able to do `button.on('someDOMevent', fn)` it also needs to support `Y.Node.DOM_EVENTS` (handled by `Y.Node.prototype.on`).

## Idea
Might be crazy, but throw some events one way, the rest the other way. There are a few small issues to figure out, perf tweaks, but it seems to work fine. Interested in your thoughts.

### Implementation example
```javascript
var button = new Y.Button({
srcNode: Y.one('#event'),
on: {
click: function(){
console.log('Boom');
},
mouseover: function(){
console.log('Goes the dynamite')
}
}
});

button.on("click", function(e){
Y.log("Clicked!");
});

button.on('selectedChange', function(){
Y.log('toggled');
});
```

If this isn't an ideal solution, then there is a fundamental issue that we need to figure out on how to handle a single `on` method, that supports two different categories of events. Or, we just require users to go to button.getNode().on to assign something like `click`, which just doesn't seem intuitive considering how important a `click` event is for a button.