Skip to content

Instantly share code, notes, and snippets.

@brikis98
Created June 12, 2011 03:09
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 brikis98/1021210 to your computer and use it in GitHub Desktop.
Save brikis98/1021210 to your computer and use it in GitHub Desktop.
JavaScript class declaration with inheritance
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) {
// ...
};
@brikis98
Copy link
Author

brikis98 commented Aug 9, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment