docs: function ViewerSelector(defaultViewer) {
    // Try to load the selected key from local storage.
    try {
      this.selectedKey = localStorage.getItem(VIEWER_KEY);
    } catch (error) {
      console.error('Failed to load viewer profile: %s', error);
    }
  
    //If none exists, or if localstorage is unavailable, use the default key.
    if (!this.selectedKey) {
      this.selectedKey = defaultViewer || DEFAULT_VIEWER;
    }
  
    this.dialog = this.createDialog_(DeviceInfo.Viewers);
    this.root = null;
    this.onChangeCallbacks_ = [];
  }