Let's move this into a dom-helper, nothing composer specific code here.