exposed document to window for debugging purposes