Allow override of root DOM element.

Attempt at a resolution for issue #461