Get URL from TChromium

Post Reply
dvhooren
Posts: 5
Joined: Fri May 08, 2020 3:54 pm

Get URL from TChromium

Post 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?
User avatar
salvadordf
Posts: 2988
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Get URL from TChromium

Post 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
dvhooren
Posts: 5
Joined: Fri May 08, 2020 3:54 pm

Re: Get URL from TChromium

Post by dvhooren »

Hi,

I do not use or have set a VisibleNavigationEntry so an AV will popup at trying to get the URL.
User avatar
salvadordf
Posts: 2988
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Get URL from TChromium

Post by salvadordf »

Sorry for not replying before. I see in Facebook that you already found another TChromium event with the information you need. :)
hvassbotn
Posts: 29
Joined: Tue Apr 25, 2017 3:02 pm
Location: Oslo, Norway
Contact:

Re: Get URL from TChromium

Post by hvassbotn »

Care to share the solution..? :)
User avatar
salvadordf
Posts: 2988
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Get URL from TChromium

Post by salvadordf »

https://www.facebook.com/groups/1370122 ... 4213642294
I found a solution. I can use the event OnAddressChange on TChromium
Post Reply