Get URL from TChromium

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

Get URL from TChromium

Post by dvhooren » Thu May 21, 2020 9:21 am

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: 2337
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Get URL from TChromium

Post by salvadordf » Thu May 21, 2020 10:04 am

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: 4
Joined: Fri May 08, 2020 3:54 pm

Re: Get URL from TChromium

Post by dvhooren » Thu May 21, 2020 10:15 am

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: 2337
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Get URL from TChromium

Post by salvadordf » Fri May 22, 2020 7:07 am

Sorry for not replying before. I see in Facebook that you already found another TChromium event with the information you need. :)

Post Reply