Returns the `document` object from a DOM object