jQuery.aop.after( {target: window, method: 'MyGlobalMethod'}, function(result) { alert('Returned: ' + result); } );Array<Function>
jQuery.aop.after( {target: String, method: 'indexOf'}, function(index) { alert('Result found at: ' + index + ' on:' + this); } );Array<Function>
jQuery.aop.around( {target: window, method: 'MyGlobalMethod'}, function(invocation) {
alert('# of Arguments: ' + invocation.arguments.length);
return invocation.proceed();
} );Array<Function>
jQuery.aop.around( {target: String, method: 'indexOf'}, function(invocation) {
alert('Searching: ' + invocation.arguments[0] + ' on: ' + this);
return invocation.proceed();
} );Array<Function>
Matches all global methods starting with 'Get' and followed by a number.
jQuery.aop.around( {target: window, method: /Get(\d+)/}, function(invocation) {
alert('Executing ' + invocation.method);
return invocation.proceed();
} );Array<Function>
jQuery.aop.before( {target: window, method: 'MyGlobalMethod'}, function() { alert('About to execute MyGlobalMethod'); } );Array<Function>
jQuery.aop.before( {target: String, method: 'indexOf'}, function(index) { alert('About to execute String.indexOf on: ' + this); } );Array<Function>
jQuery.aop.introduction( {target: window, method: 'MyGlobalMethod'}, function(result) { alert('Returned: ' + result); } );Array<Function>
jQuery.aop.introduction( {target: String, method: 'log'}, function() { alert('Console: ' + this); } );Array<Function>
Disable regex matching.
jQuery.aop.setup( { regexMatch: false } );