Minimal utils for applying transformation to DOM.