I would like to extend some group or class if you want in DOM but I dont want to have all lements extended. It is possible?
for example:
document.getElementsByClass('extended').myMethod(); // working
BUT
document.getElementById('elementNotExtendedClass').myMethod(); // shouldnt be working
Because I dont want to mess all elements, just the selected ones. Maybe it should be done somehow by creating my own version of createElement() method in document. For example document.CreateMyElement().
Or any ideas? Thanks
Edit June 06: I am looking for solution where prototype chain retains working, so I can change some shared methods and properties at once.