Page 1 of 1
Why i can't load this page ?
Posted: Wed Nov 21, 2018 6:18 pm
by thefunkyjoint
Hi,
When i try to load the page below on Chrome , it loads succesfully :
https://api.whatsapp.com/send?phone=551 ... &text=test
When i try to load the same page on CEF4Delphi, it only gives me a blank page. Actually, the content is loaded for a fraction of second, then the page goes blank.
Any hints ?
Thanks !
Re: Why i can't load this page ?
Posted: Wed Nov 21, 2018 6:43 pm
by dilfich
Error loading whatsapp://send?phone=551199996024&text=test
ERR_UNKNOWN_URL_SCHEME
Re: Why i can't load this page ?
Posted: Wed Nov 21, 2018 8:40 pm
by salvadordf
dilfich is right. That web page is trying to open a resource in a URL with an unknown "
whatsapp" scheme.
This known CEF3 issue might be related :
https://bitbucket.org/chromiumembedded/ ... on-changes
If you need to block those requests you can use the workaround described in the comments of that issue.
These are the code comments for the TChromium.OnProtocolExecution event :
Code: Select all
///
// Called on the UI thread to handle requests for URLs with an unknown
// protocol component. Set |allow_os_execution| to true (1) to attempt
// execution via the registered OS protocol handler, if any. SECURITY WARNING:
// YOU SHOULD USE THIS METHOD TO ENFORCE RESTRICTIONS BASED ON SCHEME, HOST OR
// OTHER URL ANALYSIS BEFORE ALLOWING OS EXECUTION.
///
Re: Why i can't load this page ?
Posted: Thu Nov 22, 2018 5:13 am
by dilfich
Official chrome also does not ship to this address, so this is not the problem of CEF3 itself..
Re: Why i can't load this page ?
Posted: Thu Nov 22, 2018 11:59 am
by thefunkyjoint
Thanks for the info !
Re: Why i can't load this page ?
Posted: Mon Dec 21, 2020 8:59 pm
by ericktux
hello friends, this way it works for me
Code: Select all
procedure TMiniBrowserFrm.Chromium1ProtocolExecution(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const request: ICefRequest; var allowOsExecution: Boolean);
begin
//allowOsExecution:=true;
//ShowMessage('test');
Chromium1.StopLoad;
end;