Extracted DOM helpers and moved them to 'substance-util.dom'.