Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
simple aop in javascript
var fio = {};
fio.deneme = function(xxx){
alert(xxx);
}
var oldfunction = fio.deneme;
fio.deneme = function(){
alert('fio called');
oldfunction.apply(fio, arguments);
alert('fio ended');
}
fio.deneme('ff');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.