Function Reference


_IEDocReadHTML

Returns the full HTML source of a document

#include <IE.au3>
_IEDocReadHTML ( ByRef $oObject )

Parameters

$oObject Object variable of an InternetExplorer.Application, Window or Frame object

Return Value

Success: the HTML included in the <HTML> of the document, including the <html> and </html> tags.
Failure: sets the @error flag to non-zero.
@error: 3 ($_IEStatus_InvalidDataType) - Invalid Data Type
@extended: Contains invalid parameter number

Remarks

This function returns the document source after any client-side modifications (e.g. by AutoIt or by client-side JavaScript).
It may therefore be different than what is shown by the browser View Source or by _INetGetSource().

Related

_IEBodyReadHTML, _IEDocInsertHTML, _IEDocInsertText, _IEDocWriteHTML, _INetGetSource

Example

; Open a browser with the basic example, read the document HTML
; (all HTML including the <HEAD> and script) and display it in a MsgBox

#include <IE.au3>
#include <MsgBoxConstants.au3>

Local $oIE = _IE_Example("basic")
Local $sHTML = _IEDocReadHTML($oIE)
MsgBox($MB_SYSTEMMODAL, "Document Source", $sHTML)

_IEQuit($oIE)