Borrow some methods from document.