Added the window document to entity manager tryRenderToElement