I would like to create a new function that I can use on elements, like this:
document.getElementById("element").myNewFunction();
I'm not talking about this:
document.getElementById("element").myNewFunction = function(){
doSomething...
}
Because this works on that element only, but how should I create global function what I can use on all elements like the ones what are built in to JavaScript?