Skip to content

Instantly share code, notes, and snippets.

@ui2code
Created November 27, 2014 05:27
Show Gist options
  • Save ui2code/845f7015b742126cf5d2 to your computer and use it in GitHub Desktop.
Save ui2code/845f7015b742126cf5d2 to your computer and use it in GitHub Desktop.
Aspect - Dojo 1.8.3
require([
'dojo/aspect'
], function (
aspect
) {
var a = {
foo: function (param) {
console.log(param);
}
};
aspect.after(a, 'foo', function (method, args) {
console.log('first');
});
aspect.after(a, 'foo', function (method, args) {
console.log('second');
});
a.foo(1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment