List icon Contents

Posted on November 27, 2024

JxBrowser 8.2.0

Chromium traffic

Some of our clients reported that Chromium sends unexpected requests to external web services sometimes. We figured out that Chromium features such as Google Cloud Messaging, Translate Ranker, Extensions Updater, Safe Browsing, Spell Checker, Widevine etc. make requests to the external Google web services such as https://ssl.gstatic.com, https://clients4.google.com, to work properly.

We understand that any unexpected request to an external web service might be treated as a security threat and should be blocked. We analyzed all the Chromium features that send requests to external web services and ensured you have full control over them via the JxBrowser API. The features you cannot control using the API are disabled by default to prevent unexpected requests to external web services.

In terms of this enhancement, we removed the disableChromiumTraffic Engine option because it’s not needed anymore.

Java Records

You can now inject Java Record instances into JavaScript and work with them in the JavaScript code.

Let’s say you have the following Java Record class that is annotated with the @JsAccessible annotation to make it accessible from JavaScript:

Java
@JsAccessible
public record User(String fullName, String email) {}

You can create an instance of this type and inject it into the JavaScript code like any other Java object:

Java
browser.set(InjectJsCallback.class, params -> {
    JsObject window = params.frame().executeJavaScript("window");
    window.putProperty("user", new User("John Doe", "john.doe@mail.com"));
    return Response.proceed();
});

Now you can work with the injected user and access all its auto-generated methods in the JavaScript code like that:

JavaScript
console.log(user.fullName());
console.log(user.email());

Context menu content type

The ShowContextMenuCallback.Params class has been extended with the contentType() method that allows you to get a better understanding of the web page content type the user right-clicked on. It allows you to fill your custom context menu with the appropriate items based on the content type:

Java
browser.set(ShowContextMenuCallback.class, (params, tell) -> {
    var contentType = params.contentType();
    if (contentType.contains(ContextMenuContentType.CONTEXT_MENU_CONTENT_TYPE_COPY)) {
        // Some text is selected, so you can add the "Copy" item to the context menu.
    }
    if (contentType.contains(ContextMenuContentType.CONTEXT_MENU_CONTENT_TYPE_EDITABLE)) {
        // User right-clicked on the editable content, so you can add
        // the "Paste" item to the context menu.
    }
    tell.close();
});

Chromium 131.0.6778.70

We upgraded Chromium to a newer version, which introduces 12 security fixes, including:

For the complete list of Chromium fixes and improvements since the previous Chromium upgrade please visit the product blog posts for the following versions:

Quality enhancements

  • The 7-zip library we use to extract Chromium binaries from JxBrowser JAR files has been updated to version 24.08.
  • The Implementation-Version attribute with the JxBrowser version is now added to the MANIFEST.MF file of the JxBrowser JARs with Chromium binaries.
  • Fixed broken HTML select dropdown when GPU is disabled on Windows in the hardware accelerated rendering mode.
  • Fixed incorrect HTML select dropdown location on Windows in the off-screen rendering mode.
  • Fixed NullPointerException in the JavaFX BrowserView component when the cursor is changed in the off-screen rendering mode.
  • Fixed the issue when JxBrowser doesn’t detect the read-only directory on Linux and tries to extract the Chromium binaries, causing the java.nio.file.FileSystemException error.
  • Fixed the issue when the Adobe Acrobat Chrome extension fails to open the extension settings page in a new popup window when clicking the “Open PDF” button and then the “Turn on” button. The ERR_ADDRESS_UNREACHABLE error page is displayed instead because JxBrowser fails to load the chrome://extensions/... URL.
  • Fixed the java.lang.NullPointerException: Cannot invoke "javafx.scene.image.WritableImage.getPixelWriter()" because "this.image" is null error in the JavaFX BrowserView component during rendering the web page in the off-screen rendering mode.

Download JxBrowser 8.2.0

Please share your email with us, and we'll send you download instructions.

Sending...
Please check your inbox.

We were unable to send the email. Please use the direct link to download JxBrowser.

If you are a registered customer you don't need to do anything to use this update.

If you would like to evaluate the product, you need an evaluation license.

Get free 30-day trial