docs: function aboutSessionRestore_getElement(spec) {
      var elem = null;
  
      switch(spec.type) {
        case "button":
          elem = new elementslib.Lookup(this._controller.window.document, PREF_DIALOG_BUTTONS +
                                        '/{"dlgtype":"' + spec.subtype + '"}');
          break;
        case "deck":
          elem = new elementslib.Lookup(this._controller.window.document, PREF_DIALOG_DECK);
          break;
        case "deck_pane":
          var deck = this.getElement({type: "deck"}).getNode();
  
          // XXX: Bug 390724 - selectedPane is broken. So iterate through all elements
          var panel = deck.boxObject.firstChild;
          for (var ii = 0; ii < deck.selectedIndex; ii++)
            panel = panel.nextSibling;
  
          elem = new elementslib.Elem(panel);
          break;
        case "selector":
          elem = new elementslib.Lookup(this._controller.window.document, PREF_DIALOG_SELECTOR);
          break;
        case "selector_button":
          elem = new elementslib.Lookup(this._controller.window.document, PREF_DIALOG_SELECTOR +
                                        '/{"pane":"' + spec.value + '"}');
          break;
        default:
          throw new Error(arguments.callee.name + ": Unknown element type - " + spec.type);
      }
  
      return elem;
    }