Given any DOM object, returns a reference to the associated document object
#include <IE.au3>
_IEDocGetObj ( ByRef $oObject )
$oObject | Object variable of an InternetExplorer.Application, Window, Frame or any DOM object |
Success: | an object variable pointing to the Document object. |
Failure: | sets the @error flag to non-zero. |
@error: | 3 ($_IEStatus_InvalidDataType) - Invalid Data Type |
@extended: | Contains invalid parameter number |
Given any DOM object (e.g. Browser, Window, Frame, iFrame, Document or Document Element) this will return a reference to the associated document object.
It is particularly useful when writing generalized functions when you cannot control the type of object that will be passed in.
; Open a browser to the AutoIt Homepage, get a reference
; to the document object and display a document attribute
#include <IE.au3>
#include <MsgBoxConstants.au3>
Local $oIE = _IECreate("http://www.google.com")
Local $oDoc = _IEDocGetObj($oIE)
MsgBox($MB_SYSTEMMODAL, "Document Created Date", $oDoc.fileCreatedDate)