B2G/gecko/browser/components/tabview/search.js
// Given a <TabItem> or a <xul:tab> returns the tab's name.
Given a  or a  returns the tab's name.
Given a or a returns the tab ' s name .
function TabUtils_nameOf(tab) {
    return tab.label != undefined ? tab.label : tab.$tabTitle[0].textContent;
  }
function TabUtils_nameOf ( tab ) { return tab . label != undefined ? tab . label : tab . $tabTitle [ 0 ] . textContent ; }
Given a <TabItem> or a <xul:tab> returns the tab's name.
Given a <TabItem > or a <xul : tab > returns the tab ' s name .
// We can have two types of tabs: A <TabItem> or a <xul:tab> // because we have to deal with both tabs represented inside // of active Panoramas as well as for windows in which // Panorama has yet to be activated. We uses object sniffing to // determine the type of tab and then returns its name.     