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

I've wanted to have logic to support special behavior for a an EventTarget's subscription methods before. Today it's tricky because

1. ET is often `augment()`ed onto a class, which means the `on()` method isn't the *actual* `on()` method from ET.proto but a sequestered proxy that reassigns the instance's `on()` method on its first call,
2. There are multiple methods to address, not just `on()` - `after()`, `once()`, `onceAfter()`, and `before()`
3. The subscription methods accept multiple signatures. It's easy to miss at least one.

WRT #1, if Node is `augment()`ed with ET, then calling `Node.proto.on.apply(node, ...)` will be executing the proxy method for each new DOM event subscription. I don't think Node uses `augment()`, but this needs to be double checked.

I wish I wish I wish we had configurable default behavior support in ET. Maybe you'd like to file that ticket?

The API you propose is good. It's the gooey innards where things get complicated. If you can verify Node doesn't (and won't) `augment()`, and take care of #2 and mirror the signature tests for #3, then this might be alright until I can get something better in the infrastructure layer.