Skip to content

Instantly share code, notes, and snippets.

@fatihacet
Forked from anonymous/gist:666343
Created April 14, 2011 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatihacet/919393 to your computer and use it in GitHub Desktop.
Save fatihacet/919393 to your computer and use it in GitHub Desktop.
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