than our
    // container.
    for (let panel of state.panels) {
      if (panel.selected) {
        Array.prototype.map.call(
          this._doc.getElementsByClassName(panel.id),
          item => item.classList.add("selected")
        );
      } else {
        Array.prototype.map.call(
          this._doc.getElementsByClassName(panel.id),
          item => item.classList.remove("selected")
        );
      }
    }
  },

  _clearChilden() {
    while (this.container.firstChild) {
      this.container.firstChild.remove();
    }
  },

  _attachListeners() {
    let syncPrefLinks = this.container.querySelectorAll(".sync-prefs");
    for (let link of syncPrefLinks) {
      link.addEventListener("click", this.props.onSyncPrefClick);
    }
    this.container
      .querySelector(".connect-device")
      .addEventListener("click", this.props.onConnectDeviceClick);
  },
};
PK