refactor DOM.extend
DOM.extend supports constructor shortcut
reduce code size