pub fn document() -> Document
Gets document object.
This function panics when document doesn’t exist in window or if window doesn’t exist.