Created
June 12, 2011 03:09
-
-
Save brikis98/1021210 to your computer and use it in GitHub Desktop.
JavaScript class declaration with inheritance
This file contains 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
LinkedInClient.prototype = new BaseClient(); | |
LinkedInClient.prototype.constructor = LinkedInClient; | |
function LinkedInClient(keys, tokens) { | |
// ... | |
}; | |
LinkedInClient.prototype.getRequestToken = function(redirectUrl, callback) { | |
LinkedInClient.prototype.getRequestToken.call(this, redirectUrl, callback); // call method of "super" class | |
}; | |
LinkedInClient.prototype.getAccessToken = function(oauthVerifier, callback) { | |
// ... | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See CoffeeScript: JavaScript that’s easy on the eyes for more information.