Skip to content

Instantly share code, notes, and snippets.

@alanzhao
Created October 22, 2013 23:31
Show Gist options
  • Save alanzhao/7109998 to your computer and use it in GitHub Desktop.
Save alanzhao/7109998 to your computer and use it in GitHub Desktop.
//version 1
OnboardingModule.nodeView._connectParent = OnboardingModule.nodeView.connectParent;
OnboardingModule.nodeView.connectParent = _.wrap(OnboardingModule.nodeView.connectParent, function(c, event){
alert('before');
OnboardingModule.nodeView._connectParent(event);
alert('after');
});
//version 2
OnboardingModule.nodeView.connectParent = _.wrap(OnboardingModule.nodeView.connectParent, function(func, event){
alert('before');
func(event);
alert('after');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment