Posted on
JxBrowser 7.12
Good news everyone! JxBrowser 7.12 is based on Chromium 84!
We have made some updates to the public API of JxBrowser, due to several breaking changes in the Chromium 84 API. Please see the parts of the API which were been removed from JxBrowser, and the alternatives we suggest to use instead.
Chromium 84
Chromium has been updated to version 84.0.4147.135.
In this Chromium build some of its features wrapped with the JxBrowser have been removed or changed, so this JxBrowser version introduces several breaking changes in the public API.
Check out the migration guide for this version to see what API has been changed/removed and what alternatives you should use instead.
DOM
Trusted events
The com.teamdev.jxbrowser.dom.event.Event interface has been extended with the isTrusted() method that allows
detecting whether event was generated by a user action or it was created/modified and dispatched
via EventTarget.dispatchEvent().
MouseEvent: page location
The com.teamdev.jxbrowser.dom.event.MouseEvent interface has been extended with pageLocation() that allows getting
the location of the mouse cursor in the document coordinate system at the time the event occurred.
KeyEvent: key codes
The functionality that allows getting the key code from com.teamdev.jxbrowser.dom.event.KeyEvent has been re-designed
to be similar to DOM KeyboardEvent. We introduced
the DomKeyCode enum for the DOM key codes and extended com.teamdev.jxbrowser.dom.event.KeyEvent with the methods
that allow obtaining the DOM key code and a string that represents a UTF-8 character associated with the physical key,
if it has a printed representation. For example:
document.addEventListener(EventType.KEY_PRESS, event -> {
if (event instanceof KeyEvent) {
KeyEvent keyEvent = (KeyEvent) event;
DomKeyCode keyCode = keyEvent.domKeyCode();
String character = keyEvent.character();
System.out.println("DOM KeyEvent: keyCode=" + keyCode + ", character=" + character);
}
}, false);
JS accessible Java classes
The JavaScript-Java Bridge API has been extended with com.teamdev.jxbrowser.js.JsAccessibleClasses that allows telling
that the Java instances of specific types are accessible from JavaScript. For example:
JsAccessibleClasses.add(ArrayList.class, LinkedList.class);
Cookie SameSite
The SameSite cookie attribute support
has been added.
Improvements
- Now the library passes the JS tests that check “
MovementXandMovementYvary in mouse events” in the off-screen rendering mode. - Since this version, the
Frame.isMain()method does not send a request to the Chromium engine to find out whether this frame is a main (top-level) frame in the browser or not. Now, this information is provided when creating aFrameand cached for further calls. - Running the Chromium executable shipped with the JxBrowser Chromium binaries is not allowed now. The Chromium binaries used by JxBrowser are supposed to be used only by JxBrowser and users should not be able to run it directly and use it as a regular web browser application.
- Embedding JavaFX
BrowserViewinto the containers that inheritsJFXPanelis now allowed. For example:JFXPanel fxPanel = new MyJFXPanel(); BrowserView view = BrowserView.newInstance(browser); fxPanel.setScene(new Scene(new BorderPane(view), 600, 600)); private static final class MyJFXPanel extends JFXPanel {} - The
TextFinderJavadoc has been extended with additional details on how the text search works, how it highlights the matches, how the first match is detected, etc. - By default, Chromium creates the
debug.logfile in the directory where the binaries are located. In some environments access to this directory might be forbidden and the operating system might report such attempts. Since this version, Chromium will not be creating thedebug.logfile anymore and the corresponding log messages will be redirected to JxBrowser logging. - Now, the Chromium build used in the library is built using the
is_official_build=trueflag. The official Chromium build disables the experimental Study Configurations that are disabled in the official Google Chrome builds. One of such experimental functionalities that was enabled in the previous versions of JxBrowser, is Page Freezing that might freeze the web page and stop JavaScript execution. So, the Chromium engine used by the library becomes closer to the official Chromium builds in terms of the enabled/disabled internal functionality. - Functionality that triggers Windows Audit Failures
is disabled. The issue was caused by Chromium calling the
LogonUser()function from Windows API, and passing an empty password to it. We resolved the issue by disabling functionality that tries to log on using an empty password. This change does not affect any other Chromium functionality.
Fixed issues
- The “Aw, snap” page not displayed when Chromium render process is crashed.
- Broken rendering introduced in 7.9 in JavaFX in the off-screen rendering mode on Windows.
- Web content not displayed after hiding and showing
JFramewith the embeddedBrowserViewin the hardware accelerated rendering mode on Linux. - The HTML5 Drag and Drop events with empty data flavor ignored in the off-screen rendering mode, which resulted in some HTML5 DnD events not working at all.
- The
NullPointerExceptionerror when dragging a file from the file system to the SwingBrowserViewinstance in the off-screen rendering mode. - The
NullPointerExceptionerror when displaying JavaFXScenewith the embeddedBrowserViewinstance after the primaryStageis shown in the off-screen rendering mode. CookieStorenot saving the cookies with the unspecifiedSameSiteattribute.ShowContextMenuCallbacknot called when right-clicking inside PDF Viewer.- The off-screen rendering not working on Linux with NVidia GeForce 1650 and the 430.64 driver version.
- The JavaScript-Java Bridge functionality not being able to call a Java method marked with the
@JsAccessibleannotation if there are other methods with the same name. - The spell checker dictionaries not being configured when the
Engineinstance is running in the Incognito mode. - Broken rendering in the Print Preview dialog in the hardware accelerated rendering mode in SWT on macOS.
- The Print Preview dialog not displayed in the off-screen rendering mode in SWT on macOS.
- The default Swing
BrowserViewcontext menu being not visible when right-clicking Flash on a web page in the hardware accelerated rendering mode on Windows and Linux. Browserunable to be resized to a size smaller than 300px on macOS.- The DOM event listener for
EventType.DOUBLE_CLICKnever being invoked. - The
EnterMouseCallbackandExitMouseCallbacknot being called in the off-screen rendering mode. In the hardware accelerated rendering mode on Windows and Linux theEnterMouseCallbackcould not be invoked because it was ignored by the Chromium engine. - The SWT
BrowserViewcomponent being not visible in Eclipse’sParton tab switch in the off-screen rendering mode. - Wrong default save file name when printing the currently loaded web page to PDF in SWT.
- Spell checker initialization failure when typing some text in an input field on the loaded web page with disabled Chromium traffic.
- The custom CSS cursors blurred on Windows in the off-screen rendering mode.
- Black flickering when adding/removing JavaFX
BrowserViewintoSplitPanein the hardware accelerated rendering mode on Windows. - Flickering with a random black rectangle when showing/hiding
BrowserViewin the off-screen rendering mode on Windows. - The methods marked with the
@JsAccessibleannotation of a Java object injected into JavaScript being called one more time on closingBrowser. - The
IndexOutOfBoundsExceptionerror when closing the SwingBrowserViewpopup instance via thewindow.close()JavaScript function. - The
ShowNetErrorPageCallbackcallback not being called when loading an HTTPS web page with an invalid SSL certificate. - Not being able to set focus to an HTML input field located inside an
IFRAMEwith the different domain in the off-screen rendering mode. - Support of Firebase Cloud Messaging is restored.
- Widevine functionality on macOS and Windows is re-introduced after v7.8.
- The
MouseEvent.movementXandMouseEvent.movementYattributes should be different for the different mouse move events in the off-screen rendering mode. - JVM crashes due to multiple errors in the JNI related to
mach_portfunctionality on macOS.
Download JxBrowser 7.12
Please share your email with us, and we'll send you download instructions.
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.
Follow @JxBrowser to get notified of the library updates.
Subscribe to our RSS feed to get instant updates on new releases.
Subscribe to get notifications about the latest releases.