docs: function tabBrowser_getElement(spec) {
      var document = this._controller.window.document;
      var elem = null;
  
      switch(spec.type) {
        /**
         * subtype: subtype to match
         * value: value to match
         */
        case "tabs":
          elem = new elementslib.Lookup(this._controller.window.document,
                                        TABS_TABS);
          break;
        case "tabs_allTabsButton":
          elem = new elementslib.Lookup(this._controller.window.document,
                                        TABS_TOOLBAR + '/id("alltabs-button")');
          break;
        case "tabs_allTabsPopup":
          elem = new elementslib.Lookup(this._controller.window.document, TABS_TOOLBAR +
                                        '/id("alltabs-button")/id("alltabs-popup")');
          break;
        case "tabs_newTabButton":
          elem = new elementslib.Lookup(this._controller.window.document,
                                        TABS_ARROW_SCROLLBOX + '/anon({"class":"tabs-newtab-button"})');
          break;
        case "tabs_scrollButton":
          elem = new elementslib.Lookup(this._controller.window.document,
                                        TABS_ARROW_SCROLLBOX +
                                        '/anon({"anonid":"scrollbutton-' + spec.subtype + '"})');
          break;
        case "tabs_strip":
          elem = new elementslib.Lookup(this._controller.window.document, TABS_STRIP);
          break;
        case "tabs_tab":
          switch (spec.subtype) {
            case "index":
              elem = new elementslib.Elem(this._tabs.getNode().getItemAtIndex(spec.value));
              break;
          }
          break;
        case "tabs_tabCloseButton":
          var node = document.getAnonymousElementByAttribute(
                       spec.value.getNode(),
                       "anonid",
                       "close-button"
                     );
          elem = new elementslib.Elem(node);
          break;
        case "tabs_tabFavicon":
          var node = document.getAnonymousElementByAttribute(
                       spec.value.getNode(),
                       "class",
                       "tab-icon-image"
                     );
  
          elem = new elementslib.Elem(node);
          break;
        case "tabs_tabPanel":
          var panelId = spec.value.getNode().getAttribute("linkedpanel");
          elem = new elementslib.Lookup(this._controller.window.document, TABS_BROWSER +
                                        '/anon({"anonid":"tabbox"})/anon({"anonid":"panelcontainer"})' +
                                        '/{"id":"' + panelId + '"}');
          break;
        default:
          throw new Error(arguments.callee.name + ": Unknown element type - " + spec.type);
      }
  
      return elem;
    }