var
IpStream: IPersistStreamInit;
AStream: TMemoryStream;
begin
AStream := TMemoryStream.Create;
IpStream := WebBrowser.Document as IPersistStreamInit;
if Assigned(IpStream) and Succeeded(IpStream.save(TStreamadapter.Create(AStream), TRUE)) then
begin
AStream.Seek(0, 0);
Memo.Lines.LoadFromStream(AStream);
end;
AStream.Free;
end;