source/lib/VBDockPanel.js
// Click event handler for the new-connection tab item header

Click event handler for the new-connection tab item header
Click event handler for the new - connection tab item header
onAddTabClick(e) {
    if (e.target) {
      this.selectedConn = null
      for (let tab of this.tabHeader.getElementsByClassName('selected')) {
        tab.classList.remove('selected')
      }
      this.tabAdd.classList.add('selected')
      for (let page of this.tabContentContainer.
                            getElementsByClassName('page')) {
        page.style.display = 'none'
      }
      this.connContainer.style.display = 'none'
      this.deviceListPage.style.display = 'block'
      this.connectButton.focus()
    }
  }
onAddTabClick ( e ) { if ( e . target ) { this . selectedConn = null for ( let tab of this . tabHeader . getElementsByClassName ( 'selected' ) ) { tab . classList . remove ( 'selected' ) } this . tabAdd . classList . add ( 'selected' ) for ( let page of this . tabContentContainer . getElementsByClassName ( 'page' ) ) { page . style . display = 'none' } this . connContainer . style . display = 'none' this . deviceListPage . style . display = 'block' this . connectButton . focus ( ) } }
Click event handler for the new-connection tab item header
Click event handler for the new - connection tab item header
// Remove "selected" from all other tabs' classes
 // Select this tab's class to include "selected"
 // Set all other (or current) tabs' display to 'none'
 // Set this tab's display to 'block'
 // Reset selectedConn
 // Remove 'selected' class from any currently-selected tab
 // Add 'selected' class to the Add tab
 // Hide the connection tabs
 // Hide the connection tabs' container
 // Display the Add tab
 // Set the keyboard focus to the Connect button
