API
Specific requirements are only available on the Enterprise plan. Please contact us if you want to know more. |
Equo Chromium also supports extra CEF APIs that are not part of the SWT API, but that are very useful for our customers applications. See below a non-exhaustive list of the APIs that Equo Chromium provides.
Find API
To search text in the browser widget:
ChromiumBrowser extraApi = (ChromiumBrowser) browser.getWebBrowser();
extraApi.find(“Text”, forward, matchCase);
Zoom API
To zoom in the browser widget:
ChromiumBrowser extraApi = (ChromiumBrowser) browser.getWebBrowser();
extraApi.zoom(2);
Custom SSL Certificates
You can pass a PEM certificate that will be used when Chromium can’t validate the server certificate. If the provided certificate matches the server certificate navigation is allowed. To set the custom .pem certificate:
-Dswt.chromium.ssl=/path/to/cert.pem
.pem certificate can be downloaded with any browser or with Openssl: |
echo -n | openssl s_client -connect url.com:443 | openssl x509 > cert.pem
Ignore Certificate Errors
Ignore certificate errors in the browser.
Browser browser = new Browser(parent, SWT.NONE);
ChromiumBrowser extraApi = (ChromiumBrowser) browser.getWebBrowser();
extraApi.ignoreCertificateErrors(true);
For browser certificate errors to be ignored it must be called upon creation, otherwise it will have an effect on all other browsers. You can reset certificate errors by calling the method with false .
|
Console Listener API
To listen for Javascript console messages:
ChromiumBrowser extraApi = (ChromiumBrowser) browser.getWebBrowser();
extraApi.addConsoleListener((int level, String message, String source, int line) -> {...; return true;});
If you need support for a custom CEF API it’s likely that we already support it. Contact our Support Team for more information. |