Page 1 of 1
browser.Host.StartDownload and chromium.StartDownload are same?
Posted: Wed Mar 13, 2019 1:10 am
by coater
browser.Host.StartDownload and chromium.StartDownload are same?
Re: browser.Host.StartDownload and chromium.StartDownload are same?
Posted: Wed Mar 13, 2019 8:29 am
by salvadordf
Hi,
They are almost the same but Chromium.StartDownload is safer to use because it checks if the browser is initialized before calling that function.
Re: browser.Host.StartDownload and chromium.StartDownload are same?
Posted: Mon Mar 18, 2019 1:32 am
by coater
Thank you very much!
I have another question:
If there are some examples for browser scrollbar(not javascript)?
Re: browser.Host.StartDownload and chromium.StartDownload are same?
Posted: Mon Mar 18, 2019 7:21 am
by salvadordf
coater wrote: Mon Mar 18, 2019 1:32 amIf there are some examples for browser scrollbar(not javascript)?
No, sorry. If I remember correctly, the scrollbar can only be modified using JavaScript.
Re: browser.Host.StartDownload and chromium.StartDownload are same?
Posted: Tue Mar 19, 2019 2:05 am
by coater
Thank you very much!
mark a function here
https://stackoverflow.com/questions/139 ... -positions
var
val: ICefV8Value;
context: ICefv8Context;
excp: ICefV8Exception;
scroll: TPoint;
begin
if (Chromium1.Browser.MainFrame = nil) then
exit;
//this will work only with exact frame
context := Chromium1.Browser.MainFrame.GetV8Context;
if (context <> nil) then
begin
context.Eval('window.pageXOffset', val, excp);
scroll.x := val.GetIntValue;
context.Eval('window.pageYOffset', val, excp);
scroll.y := val.GetIntValue;
end
else
exit;
//todo: do something with scroll here
end;
edited Jun 27 '18 at 8:12
answered Nov 18 '13 at 16:18
kormizz
Re: browser.Host.StartDownload and chromium.StartDownload are same?
Posted: Tue Mar 19, 2019 8:14 am
by salvadordf
Thank you for that link!
I'll add those functions to TChromium as soon as I can.
