More proper way for registering methods

More proper way for registering DOM methods in HTMLElement.prototype