How to get source from a framed page ...the RetrieveHTML function could just get the mainframe page source .....how to get subframe's page source
I try to use this code
var
Visitor: ICefStringVisitor;
begin
Visitor := TCustomCefStringVisitor.Create(self);
if TargetFrame <> nil then
begin
mmo2.Text := TargetFrame.Name; // <!--framePath //<!--frame0-->-->
TargetFrame.GetSource(Visitor);
end;
end;
but it isn't work at all.
thank you !
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Get Source from Frame page....
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Get Source from Frame page....
Hi,
There are two possible solutions :
The second solution doesn't require to recompile CEF4Delphi and you can reuse most of the code about the javascript extension from the MiniBrowser demo.
Make sure to wait for all frames to be loaded before trying to get the HTML.
There are two possible solutions :
- Modify TChromium.Internal_GetHTML to search for a frame and use it with the visitor instead of the main frame.
- Use javascript to get the the innerHTML from the document inside a frame and then send the results to Delphi.
The second solution doesn't require to recompile CEF4Delphi and you can reuse most of the code about the javascript extension from the MiniBrowser demo.
Make sure to wait for all frames to be loaded before trying to get the HTML.
Re: Get Source from Frame page....
Thanks for your quickly replay...
both solution i will try them..

both solution i will try them..
