Last active
August 29, 2015 14:03
-
-
Save catrope/ed1ecfefdb1d16784644 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Bar() { | |
// Parent constructor | |
Bar.parent.call( this ); | |
this.v2 = null; | |
} | |
OO.inheritClass( Bar, Foo ); | |
Bar.prototype.setValue = function f( val ) { | |
// Call parent method | |
f.parent( val ); | |
this.v2 = val; | |
}; | |
Bar.prototype.getValue = function f() { | |
return 35 - f.parent(); | |
}; | |
// OO.inheritClass would have to do something like: | |
Bar.prototype.getValue.parent = Foo.prototype.getValue; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment