I am embarrassed to say that you cannot. In the end, Prototype.js did.
To be able to call getElementById('id').someNewMethod() , you will have to "extend the prototype of the return type of the getElementById object, which is Element . In some browsers, you can actually do this:
Element.prototype.someNewMethod= function() { alert('hello from a '+this.tagName); }; document.body.someNewMethod();
However, this is highly doubtful. Prototyping on your own JavaScript objects, such as Object or String , is potentially pretty tricky that when names collide between browsers and libraries, but Element and all other DOM objects can be "host objects" that don't allow prototyping.
Even if DOM objects are implemented with a full built-in JavaScript interface, no specification says that Element should expose a prototype / constructor function under the variable window property / global variable called Element .
In fact, this works in Firefox, Webkit, and Opera and IE starting with version 8. However, it is non-standard, not all browsers make all the same interfaces accessible under all the same names, and it will not work in IE6, IE7, or many smaller browsers ( e.g. in mobile browsers).
The prototype had a reserve for these browsers: it would try to increase each instance of Element with new members when it first saw each element. But it had extremely dirty side effects, and many consider them a mistake; Prototype 2.0 will no longer attempt to extend the DOM interfaces .
Perhaps in the future, someone will tie this up and make it a reliable part of the browser environment. But this is not the case today, so you should continue to use other, clunkier methods, such as wrapper functions.