-
- // Get the current list of functions bound to this event
- var handlers = element.$events[type];
-
- // Init the event handler queue
- if (!handlers)
- handlers = element.$events[type] = {};
-
- // Add the function to the element's handler list
- handlers[handler.guid] = handler;