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.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

TFMXChromium.doOnTitleChange doesn't work

Post Reply
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: TFMXChromium.doOnTitleChange doesn't work

Post by salvadordf »

Assign the procedures to the TChromium events before calling CreateClientHandler or CreateBrowser.

TChromium and TFMXChromium check what events are really used and they only create the handlers that are needed.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: TFMXChromium.doOnTitleChange doesn't work

Post by salvadordf »

Assign a procedure to that event and add some code to that procedure to check if you want to exit immediately.
For example :

Code: Select all

procedure CustomEventProcedure(Sender : TObject; ...);
begin
  if not BrowserInitialized then exit;
 
  // do something
end;
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: TFMXChromium.doOnTitleChange doesn't work

Post by salvadordf »

Then override MustCreateLoadHandler and return True.

This will create ICefLoadHandler even when you don't use the events of that interface.
Post Reply