
Is it really that easy to Glue-enable your application?
Let’s investigate with the short JavaScript scenario of opening two tabbed windows from within your current application.
Here are the steps:
- Copy the Glue42 JavaScript SDK files to a subfolder of your application dir, e.g.
lib
. The files are available under the Glue42 installation dir (%localappdata%\Tick42\GlueSDK\GlueJS
) - Include a reference to the glue42 JavaScript APIs. Below is the code for that
<script type="text/javascript" src="./lib/tick42-glue.min.js"></script>
- Go to your application project and add the code
Glue().then((glue) => { window.glue = glue; });
to initialize and register the Glue42 library - You can open as many tabbed windows as you want. Declare a window opener Promise object for each window with code, similar to the one below. Note that everything with process management is asynchronous
var launchGlue42Promise = glue.windows.open('glue42Tab', 'https://www.glue42.com/', { mode: 'tab', tabGroupId: "dynamicTabGroup", title: 'Glue42', top: 200, left: 800, width: 900, height: 600 });
- Invoke your window opener Promises with code, similar to the one below
Promise.all([launchGlue42Promise, launchGooglePromise]) .then((windows) => { const result = `Successfully opened windows: window Ids: ${windows[0].id} | ${windows[1].id}`; document.getElementById('result').innerHTML = result; });
And voilà! You have your new tabs open!
Check the following video for a similar example.
We proved it is super easy to glue-enable an application.
Check out our documentation for more answers to practical questions!