Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7062

Show
Ignore:
Timestamp:
06/19/07 15:30:59 (1 year ago)
Author:
mislav
Message:

Prototype: Event.observe now returns the event handler passed. Initial unit tests for event support code.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/prototype/branches/event/src/event.js

    r7061 r7062  
    264264  return { 
    265265    observe: function(element, type, callback, useCapture) { 
    266       if (applyToCollection(arguments)) return; 
    267       new Observer(element, type, callback, useCapture).add(); 
     266      if (!applyToCollection(arguments)) 
     267        new Observer(element, type, callback, useCapture).add(); 
     268      return callback; 
    268269    }, 
    269270