For example for this.parentNode I would like to just write this.p or instead of
document.getElementById(\'someid\') just write d
I would strongly suggest not attempting to do this, for a few reasons:
HTMLElement prototype and allow you to augment it, there's no guarantee that it will work as you expect.HTMLElement prototype, you risk naming collisions and hard-to-detect bugs.Instead, I would suggest creating wrapper objects around DOM nodes as jQuery, YUI and other libraries do.
Kangax has written a good article on this, covering all these points and more.