B2G/gecko/browser/base/content/browser.js
/* duplicateTabIn duplicates tab in a place specified by the parameter |where|.
 *
 * |where| can be:
 *  "tab"         new tab
 *  "tabshifted"  same as "tab" but in background if default is to select new
 *                tabs, and vice versa
 *  "window"      new window
 *
 * delta is the offset to the history entry that you want to load.
 */
duplicateTabIn duplicates tab in a place specified by the parameter |where|.

delta is the offset to the history entry that you want to load.
duplicateTabIn duplicates tab in a place specified by the parameter |where| . delta is the offset to the history entry that you want to load .
function duplicateTabIn(aTab, where, delta) {
  let newTab = Cc['@mozilla.org/browser/sessionstore;1']
                 .getService(Ci.nsISessionStore)
                 .duplicateTab(window, aTab, delta);
  switch (where) {
    case "window":
      gBrowser.hideTab(newTab);
      gBrowser.replaceTabWithWindow(newTab);
      break;
    case "tabshifted":
      break;
    case "tab":
      gBrowser.selectedTab = newTab;
      break;
  }
}
function duplicateTabIn ( aTab , where , delta ) { let newTab = Cc [ '@mozilla.org/browser/sessionstore;1' ] . getService ( Ci . nsISessionStore ) . duplicateTab ( window , aTab , delta ) ; switch ( where ) { case "window" : gBrowser . hideTab ( newTab ) ; gBrowser . replaceTabWithWindow ( newTab ) ; break ; case "tabshifted" : break ; case "tab" : gBrowser . selectedTab = newTab ; break ; } }
duplicateTabIn duplicates tab in a place specified by the parameter |where|.
duplicateTabIn duplicates tab in a place specified by the parameter |where| .
// A background tab has been opened, nothing else to do here.