Update DOM.js

.innerHTML clearup is preventing legend to be displayed in a separate container