kylebarrow / chibi

A tiny JavaScript micro-library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How about event handling?

naugtur opened this issue · comments

I like the idea of keeping it as small as possible, but by adding just a bit more code you can have a killer-feature.
Only thing I really hate doing in vanilla-javascript is cross-browser events and triggering them from code.
I guess it could be implemented in less than 1KB of minified code.

What events would you like to see, there are a lot of them?

Why would it matter what events?
I'd rather see $(...).on() and $(...).trigger() implemented without the
edge cases that jQuery handles.

Signatures

$(...).on('eventname',function(){})
$(...).on('eventname','selector',function(){})
$(...).trigger('eventname')

I could implement it and contribute, but I'm doing too much already and it
won't be possible till september ;)

On Tue, Jul 17, 2012 at 10:54 PM, Kyle Barrow <
reply@reply.github.com

wrote:

What events would you like to see, there are a lot of them?


Reply to this email directly or view it on GitHub:
#1 (comment)

I've added a basic event method to 0.4 while keeping the framework at 5k.