Hub (Object)

The Hub object represents an instantiated instance of the hub - generated by calling the hub method.


  • There is NO constructor for Hub object.


  • changeSelectedTab(index)- method to change the selected tab in a running hub to the provided index.
  • getSelectedTab - method to return the current selected tab's index

  • getTabsList - method to return a list of all tabs in an array object


The following snippet creates the embed hub options object and then loads the hub through the hub method into "myContainer." "myhub" is the returned instance from the method.

The script then switches the hub to tab #4 (index 3) using the changeSelectedTab method.

const hubEmbedOptions = { theme: "dark", editable: true, showTabs: true, responsiveness: "compact", }; const myhub = client.hub($("myContainer"), options); myhub.changeSelectedTab(3);