发布日期 2019年08月29日

JxBrowser 7.2

We are glad to announce the release of the new JxBrowser 7.2!

You can always tell a pro by the attention paid to the details. This version of JxBrowser allows you go into very subtleties of your application’s appearance and security, and make everything look and behave just as you planned.

Custom Error Page

We extended the API with two new callbacks that allow overriding the standard Chromium error pages for HTTP and network errors. The following simple example demonstrates how to do it:

navigation.set(ShowHttpErrorPageCallback.class, params ->
        ShowHttpErrorPageCallback.Response.show(
                "<html><body>HTTP error</body></html>"));

navigation.set(ShowNetErrorPageCallback.class, params ->
        ShowNetErrorPageCallback.Response.show(
                "<html><body>Network error</body></html>"));

Favicon

Now, you can access the favicon of the currently loaded web page via the Browser.favicon() method.

Transparent Background

The background of the web pages is opaque by default. To enable transparent background on the web pages loaded in a Browser instance please use the following setting:

browser.settings().enableTransparentBackground();

This functionality works only in the off-screen rendering mode on Windows and Linux. On macOS it works in both rendering modes.

Treat Insecure Origin As Secure

Now, you can configure the list of insecure origins that must be treated as secure using the following API:

Engine engine = Engine.newInstance(
        EngineOptions.newBuilder(renderingMode)
                .treatInsecureOriginAsSecure(
                        "http://foo.com", "*.foo.*.bar.com")
                .build());

It has the same effect as adding the --unsafely-treat-insecure-origin-as-secure Chromium switch.

Frame Initiated Download

Access an instance of the Frame initiated download using the following API:

downloads.set(StartDownloadCallback.class, (params, tell) -> {
      params.frame().ifPresent(frame -> {});
      ...
});

Node’s XPath

The API has been extended with the Node.xPath() method that allows getting a string representing XPath to the node.

Disallow JavaScript to Access Cookies

Now you can prevent JavaScript from accessing the document.cookies property using the following code:

browser.settings().disallowJavaScriptAccessCookies();

Improvements

  • Javadoc for the Swing and JavaFX artifacts is now available in the Maven repository.
  • Added ability to programmatically request focus in both Swing and JavaFX BrowserView via the browserView.requestFocus() method.
  • All the Chromium binaries on Windows 32- and 64-bit are now signed with a valid TeamDev signature.
  • Signature of the internal 7zip executables used to extract Chromium binaries on Windows is updated.

Fixed issues

  • Crash when clearing HTTP disk cache when the Incognito mode is enabled.
  • The java.lang.IllegalStateException error when creating a Browser instance.
  • Empty UrlRequest in BeforeSendUploadDataCallback.Params.
  • The java.lang.NullPointerException error and freeze when Chromium process is terminated during a blocking PRC call.
  • The java.lang.NullPointerException error when JavaFX BrowserView is created but not displayed.
  • The java.lang.IllegalArgumentException: Cannot find the /7.1/chromium-win64.7z resource in JARs error when only jxbrowser-win32.jar is included into the classpath.
  • Starting empty popups which have not been closed after download.
  • Ignored mouse clicks when BrowserView is inside a JavaFX Tab.

Download JxBrowser 7.2

请提供您的电子邮箱地址,我们会尽快将下载说明发送给您。

发送...
请检查您的收件箱。

我们无法发送电子邮件。请使用直接链接下载JxBrowser。

如果您已经是我们的注册客户,您无需任何操作,即可轻松享受此次更新。

如果您希望深入了解并体验我们的产品,您可以申请评估许可证。

获取免费 30 天体验
Go Top