Page 1 of 1

Get URL from TChromium

Posted: Thu May 21, 2020 9:21 am
by dvhooren
Hi,

Using Chromium1.LoadURL('http://...') wil navigate to a page.

However when the address changed by a component, I want to read back the URL.

e.g. l_url := Chromium.ReadURL

I tried Chromium1.Broswer.MainFrame.URL but that always returns : 'about:blank'

I can not find such call, or I do not know how to retreive the current URL from TChromium.

How can I do that?

Re: Get URL from TChromium

Posted: Thu May 21, 2020 10:04 am
by salvadordf
Hi,

Try any of these :
  • TChromium.VisibleNavigationEntry.Url
  • TChromium.VisibleNavigationEntry.DisplayUrl
  • The TChromium.OnBeforeBrowse event should have a valid frame.url when isRedirect is true

Re: Get URL from TChromium

Posted: Thu May 21, 2020 10:15 am
by dvhooren
Hi,

I do not use or have set a VisibleNavigationEntry so an AV will popup at trying to get the URL.

Re: Get URL from TChromium

Posted: Fri May 22, 2020 7:07 am
by salvadordf
Sorry for not replying before. I see in Facebook that you already found another TChromium event with the information you need. :)

Re: Get URL from TChromium

Posted: Wed Sep 09, 2020 12:30 pm
by hvassbotn
Care to share the solution..? :)

Re: Get URL from TChromium

Posted: Wed Sep 09, 2020 12:40 pm
by salvadordf
https://www.facebook.com/groups/1370122 ... 4213642294
I found a solution. I can use the event OnAddressChange on TChromium