coldbox-platform
coldbox-platform copied to clipboard
COLDBOX-1137 - Allow passing closure as second arg to listen() and unlisten() methods
I propose we add support for passing the point first and closure second. I think it's weird to pass the event name after the function:
variables.interceptorService.listen( function( interceptData ){
// do magic...
}, "ORMPreLoad" );
IMHO, this is more legible:
variables.interceptorService.listen( "ORMPreLoad", function( interceptData ){
// do magic...
} );
Resolves COLDBOX-1137.