发布日期 2017年09月14日

JxBrowser 6.15

We will get straight to the point: Chromium 60.0.3112.113 is implemented in JxBrowser 6.15!

The new version also lists some cool new features, and important improvements. Here’s a detailed record of what’s changed:

Chromium 60

The Chromium engine is upgraded to version 60.0.3112.113. It means that support of WebGL 2.0 has been automatically enabled.

Due to Chromium engine upgrade the list of supported platforms have been changed as well. Some time ago, the Chromium team announced that they will end support for Google Chrome on 32-bit Linux, Ubuntu Precise (12.04), and Debian 7 ( wheezy) in early March, 2016.

With Chromium upgrade to version 60, we drop support of Ubuntu Precise (12.04), Debian 7 (wheezy) both 32-bit and 64-bit, and all 32-bit Linux distributions as well. Now, JxBrowser supports only 64-bit Linux.

DOMNode.getXPath()

The DOMNode.getXPath() method that allows getting XPath for the given DOMNode has been implemented. The usage is pretty simple:

browser.addLoadListener(new LoadAdapter() {
    @Override
    public void onFinishLoadingFrame(FinishLoadingEvent event) {
        DOMDocument document = event.getBrowser().getDocument();
        DOMNode root = document.findElement(By.id("root"));
        System.out.println(root.getXPath());
    }
});
browser.loadHTML("<html><body><div id='root'></div></body></html>");

This example code produces the following console output:

/html/body/div[@id="root"]

Browser.setUserAgent(String userAgent)

The Browser.setUserAgent(String userAgent) method was added. It provides an ability to change user agent string runtime without re-creating Browser instance.

browser.setUserAgent("My new user agent");

Browser.setAcceptLanguage(String acceptLanguage)

The Browser.setAcceptLanguage(String acceptLanguage) method was added. It allows changing accept language string runtime.

ProxyService

A long awaited functionality that allows modifying proxy settings runtime is now available in JxBrowser. Now, you can change proxy settings runtime for specific BrowserContext instance. The new proxy configuration will be applied automatically to all Browser instances associated with the BrowserContext.

The following example demonstrates how to use the new API:

...
BrowserContext browserContext = browser.getContext();
ProxyService proxyService = browserContext.getProxyService();
proxyService.setProxyConfig(new CustomProxyConfig("http=foopy:80"));

<input> accept attribute

The FileChooserParams.getAcceptableExtensions() method was added. This method returns HTML <input> accept attribute value. Default implementation of the DialogHandler interface for both JavaFX and Swing have been updated, so that they support this attribute, and filter the files in the dialog according to the given extensions.

Pinch to zoom

The --disable-pinch switcher now can be used to disable pinch to zoom on macOS when using trackpad. This functionality is supported only by JxBrowser. Google Chrome doesn’t allow disabling pinch to zoom on macOS when using trackpad.

Improvements

  • Startup time on Windows is decreased.
  • Extra log messages printed into console output on macOS even when logging is disabled were removed.

Fixed issues

  • JavaScript mouse event listener receiving incorrect mouse button.
  • DialogHandler.onBeforeUnload() method not being invoked when disposing Browser.
  • The default BrowserContext instance always creating empty directories in user’s temp directory.
  • RejectedExecutionException exception being thrown from internal logic.
  • An internal issue with the OnPaint message deserialization.

Write us at customer-care@teamdev.com to download JxBrowser 6.15.

Go Top