Posted on Dec 26, 2019

Cheers to this around-the-holidays release! Here is what it brings:

What’s New

JSON

JxBrowser 7.5 allows you to convert JavaScript objects to a JSON string and get the JavaScript objects from a JSON string. For example:

Json json = frame.json();
JsObject jsObject = json.parse("{\"one\":1,\"two\":2}");
String jsObjectJson = json.stringify(jsObject);

Dynamic Favicons

This release extends the functionality allowing to get the favicon of the currently loaded web page, which was introduced in 7.2. Since some web pages change their favicons dynamically, we decided to enable JxBrowser to get notifications when favicon on the loaded web page is changed. Here is how:

browser.on(FaviconChanged.class, event -> {
    Bitmap newFavicon = event.favicon();
});

DOM API

In 7.5 we extended the DOM API with the following methods that were present in JxBrowser 6:

  • Element.scrollIntoView(AlignTo alignTo)
  • Node.compareDocumentPosition(Node otherNode)

Render Process PID

This version contains the RenderProcess API and functionality that allows getting PID of the render process where Frame is running. For example:

frame.renderProcess().pid();

The Navigation class now has the browser() method that allows getting the Browser instance of the Navigation instance.

The NavigationStarted and NavigationFinished events now have the isInMainFrame() method that indicates whether navigation is taking place in the main frame or not.

UrlRequest’s IP Address

The ReceiveHeadersCallback.Params class has been extended with the ipAddress() method that allows getting the IP address of UrlRequest.

Improvements

  • This version performs better when working with DOM and JavaScript objects.
  • Now all the sensitive information such as keyboard and mouse input, passwords, etc. is not printed in the debug log messages.
  • The File Save dialog, shown in DefaultStartDownloadCallback, is now modal for both Swing and JavaFX implementations.
  • The Navigation.loadUrlAndWait() method now handles navigation inside the currently loaded web page (e.g. navigations to the internal # links).
  • All Chromium binaries for Windows 32-bit and 64-bit are signed with a valid and authorized TeamDev’s signature.

Fixed issues

  • The IllegalStateException error, when focusing BrowserView after removing another BrowserView and closing its Browser in the hardware accelerated rendering mode.
  • The thread lockup, when accessing functionality during active rendering (e.g. playing HTML5 video) on the loaded web page in the off-screen rendering mode.
  • The thread deadlock when closing the Print Preview dialog in the off-screen rendering mode on Windows.
  • The IllegalArgumentException error caused by the negative width and height, when resizing BrowserView on Windows in the hardware accelerated rendering mode.
  • The memory leak, when closing the Browser instances, while their Engine is still alive.
  • The memory leak, when removing the BrowserView component from its container.
  • The memory leak in the Chromium GPU process on macOS, when resizing BrowserView. The root cause was in the unreleased mach ports in both rendering modes. This leak might cause the system reboot in case, when all the available ports are occupied.
  • Calling the XPathResult. asSnapshotNodes() method throwing the XPathException error when it should return an empty collection.
  • The Document.frame() method returning the wrong Frame when the Document instance belongs to an IFRAME.
  • The CanGetCookiesCallback callback not receiving the expected cookies from a web server, when the HTTP headers are overridden in ReceiveHeadersCallback.
  • The web content being displayed at the top left corner of the main screen, when a Swing BrowserView component is embedded into the JTabbedPane container.

Request evaluation license
Download JxBrowser 7.5

Go Top