Added support to render UI elements via the DOM.