Allow a component to draw outside the document

This introduces the flag _canDrawOutsideDocument that can be set to
indicate the component that it's ok to draw in that state.
Avoid the warning message: "Trying to replace element <div>​</div>​ which
has no parentNode"