I'm trying to create a program that load a html page that is in a localfolder, and this page has implemented some javascript resources (ex:pdf.js) that load a local pdf file.
Every time that i tried to run the program i get this error: "Fetch API cannot load file....URL scheme "file" is not supported" The local html file is loaded but the javascript cannot load the pdf.
I know there is the --allow-file-access-from-files flag, but i don't find the way to set this flag in Cef4delphi.
How I can set --allow-file-access-from-files flag on CEF4DELPHI?
Set the GlobalCEFApp.AllowFileAccessFromFiles property to True before the GlobalCEFApp.StartMainProcess call in the DPR file and CEF4DElphi will add that flag for you automatically.
If you need to use any flag/switch that it's not available as a GlobalCEFApp property just call the GlobalCEFApp.AddCustomCommandLine procedure before the GlobalCEFApp.StartMainProcess call.
However, that Fetch API error is sometimes shown when you register a custom scheme. Try registering the "http" or "https" schemes instead.