Opening New Browsers

Opening Browsers in Java

To open new browsers, or modify the web content of the ones that are already opened, you may use the WindowManager API.

Then, you can open a new browser like this:

WindowManager.getInstance()
        .openBrowser("https://www.equoplatform.com", "Second browser", IPositionConstants.POPUP);

This will open the browser in a new window. You can check the rest of IPositionConstants values to position the new browser some place in the main window.

In a similar way you can update a browser URL with the updateBrowser method by passing the new URL and the name of the browser to update. If you want to update the main browser, omit the browserName parameter. Example:

WindowManager.getInstance()
        .updateBrowser("https://docs.equoplatform.com", "Second browser");

Opening Browsers in Javascript

It’s also possible to do all this work with Javascript code. You can opt for the equo-framework Node package, or to use the global Javascript Equo API. To import a Node.js package in your application, please review the APIs section.

Examples of using the Javascript API:

equo.openBrowser({
    url: "https://www.equoplatform.com",
    name: "Second browser",
    position: "popup"
});
equo.updateBrowser({
    url: "https://docs.equoplatform.com",
    name: "Second browser"
});