Equo Chromium: Smarter Event Handling with Subscribe()
Axel Orsingher on November 27th 2025
Equo Chromium now makes it easier than ever to react to browser events in real time — with the brand-new Subscribe API.
This feature gives your application the power to intercept navigation, block popups, or track load events — all with a simple, unified interface that works across SWT, Swing and Standalone mode.
Forget about toolkit-specific listeners or complex native hooks. With browser.subscribe(), you can listen, react, and control — all from one consistent API.
One API. Endless Possibilities.
The Event Subscription API lets you attach listeners to the browser lifecycle and key navigation moments.
Whether you want to redirect URLs, prevent unwanted popups, or update UI elements when a page finishes loading, it’s all just one line away.
browser.subscribe().onBeforeBrowse(ev -> {
if ("https://www.google.com/".equals(ev.getUrl())) {
ev.prevent(); // Cancel navigation
ev.setUrl("https://equo.dev/"); // Redirect to another URL
}
});
browser.subscribe().onBeforePopup(ev -> {
if (ev.getUrl().contains("ads")) { // Block unwanted popup
ev.prevent();
}
});
browser.subscribe().onLoadEnd(ev -> {
System.out.println("Page finished loading: " + ev.getHttpStatusCode());
});
No matter the platform, your event code stays the same — predictable, elegant, and portable.
Dynamic, Declarative, and Clean
subscribe() turns your browser integration into something declarative and readable — almost like writing a live script that describes how your application should respond to user behavior.
It’s more than an event API — it’s a control layer for your embedded browser.
browser.subscribe().onAfterCreated(ev -> {
System.out.println("Browser ready — applying navigation filters.");
browser.subscribe().onBeforeBrowse(nav -> {
if (isBlocked(nav.getUrl())) {
nav.prevent();
nav.setUrl("about:blocked");
}
});
});
Flexible by Design
Need to update your UI on load events?
Easily dispatch to your toolkit’s main thread — with built-in support for Swing, SWT, and more.
// Swing example
browser.subscribe().onLoadEnd(ev ->
SwingUtilities.invokeLater(() ->
statusLabel.setText("Loaded: " + ev.getHttpStatusCode())
)
);
Add, remove, or reset listeners whenever you need — no restarts, no rebuilds.
browser.subscribe().unsubscribeAll();
Take Control of Every Click
With Equo Chromium Subscribe(), your application becomes aware, adaptive, and responsive. It’s a smarter way to manage browser behavior — and it’s available today.
To learn more about how Equo Chromium can provide modern web integrations for your application, visit our GitHub repository or contact us to discuss a modernization prototype.