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.
browser.Host.StartDownload and chromium.StartDownload are same?
browser.Host.StartDownload and chromium.StartDownload are same?
browser.Host.StartDownload and chromium.StartDownload are same?
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: browser.Host.StartDownload and chromium.StartDownload are same?
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.
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?
Thank you very much!
I have another question:
If there are some examples for browser scrollbar(not javascript)?

I have another question:
If there are some examples for browser scrollbar(not javascript)?
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: browser.Host.StartDownload and chromium.StartDownload are same?
No, sorry. If I remember correctly, the scrollbar can only be modified using JavaScript.coater wrote: Mon Mar 18, 2019 1:32 amIf there are some examples for browser scrollbar(not javascript)?
Re: browser.Host.StartDownload and chromium.StartDownload are same?
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
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
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: browser.Host.StartDownload and chromium.StartDownload are same?
Thank you for that link!
I'll add those functions to TChromium as soon as I can.
I'll add those functions to TChromium as soon as I can.
