document property

Retrieves the document object for the document that the browser is displaying.


HRESULT value = object.get_document(IDispatch** p);

Property values

Type: IDispatch

Address of a pointer to a variable of type IDispatch that receives the document object.


The IHTMLElement::document property retrieves a pointer for the active document even if the browser has hosted a document object of another type (such as a Microsoft Word document). Query the pointer for an IHTMLDocument2 interface to determine if it is indeed an HTML page. The IHTMLDocument2 interface provides access to the Document Object Model (DOM).