Passed window and document to Page