coldbox-platform icon indicating copy to clipboard operation
coldbox-platform copied to clipboard

COLDBOX-1137 - Allow passing closure as second arg to listen() and unlisten() methods

Open michaelborn opened this issue 3 years ago • 0 comments

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.

michaelborn avatar Aug 10 '22 13:08 michaelborn