Methods in the Lightning Console JavaScript API return results using promises.
Examples in this guide don’t include the $A.getCallback() wrapper because the Lightning Console JavaScript
API returns promises that already include the $A.getCallback() wrapper around callback functions. This is
reflected in the sample code throughout this guide.
This example uses the Workspace API’s openTab()
function to get the tab ID of the focused tab. Then the function calls focusTab() with the tabId returned by the openTab()
method.