-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MacOS Js extension doesn't work in multiprocess mode #499
Comments
Are you using Delphi or Lazarus? MacOS has several projects and the JS extension runs in the render process. Move the code in GlobalCEFApp.OnWebKitInitialized to the render project. I would recommend creating a Windows demo with a different executable for the CEF subprocesses. Move the GlobalCEFApp.OnWebKitInitialized code to the subprocess project and check if it works in Windows. |
I'm using Lazarus which is installed on Mac. I've modified ExternalPumpBrowser demo to show You how I made it. In this example You will find both inconveniences I've mentioned above. |
I just uploaded a new demo called JSExtensionSubProcess. It has a JSExtension_sp project that creates the executable for the CEF subprocesses and I moved all the code from GlobalCEFApp.OnWebKitInitialized to that project. In the case of MacOS, you should move the code in GlobalCEFApp.OnWebKitInitialized to the AppHelper project. Also try calling Chromium1.ShowDevTools with a nil value for the aDevTools parameter. This will create the devtools in a new window handled by CEF. |
So I have moved GlobalCEFApp.OnWebKitInitialized to AppHelper and it worked :) |
Greetings :)
I have wrote platform app based on CEF4Delphi and I've noticed an issue on MacOS platform.
JS Extension doesn't work when property
GlobalCEFApp.SingleProcess := False;
it is working when
GlobalCEFApp.SingleProcess := True
.My extension is like below:
TempExtensionCode := 'var ui;' +
'if (!ui)' +
' ui = {};' +
'(function() {';
(... some functions ... );
TempExtensionCode :=
TempExtensionCode + '})();';
Extension is working in each case on Windows.
There is minor problem with resizing DevTools (
Align := alRight
) using splitter, it's not anchoring to the right side of the form.Tested on latest stable release:
https://github.com/salvadordf/CEF4Delphi/releases/tag/120.0.6099.234
The text was updated successfully, but these errors were encountered: