Skip to content

Instantly share code, notes, and snippets.

@lamdor
Created May 17, 2009 13:41
Show Gist options
  • Select an option

  • Save lamdor/113009 to your computer and use it in GitHub Desktop.

Select an option

Save lamdor/113009 to your computer and use it in GitHub Desktop.
(function() {
document.writeln("HTMLElement.prototype = " + HTMLElement.prototype);
var something = document.getElementById('something');
document.writeln("something = " + something);
document.writeln("something.prototype = " + something.prototype);
document.writeln("something.__proto__ = " + something.__proto__);
document.writeln("HTMLElement.prototype === something.__proto__ = " +
(HTMLElement.prototype === something.__proto__));
HTMLElement.prototype.doSomething = function() {
document.writeln("i'm in " + this + " doing something");
};
something.doSomething();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment