B2G/gecko/browser/base/content/utilityOverlay.js
/**
 * openNewTabWith: opens a new tab with the given URL.
 *
 * @param aURL
 *        The URL to open (as a string).
 * @param aDocument
 *        The document from which the URL came, or null. This is used to set the
 *        referrer header and to do a security check of whether the document is
 *        allowed to reference the URL. If null, there will be no referrer
 *        header and no security check.
 * @param aPostData
 *        Form POST data, or null.
 * @param aEvent
 *        The triggering event (for the purpose of determining whether to open
 *        in the background), or null.
 * @param aAllowThirdPartyFixup
 *        If true, then we allow the URL text to be sent to third party services
 *        (e.g., Google's I Feel Lucky) for interpretation. This parameter may
 *        be undefined in which case it is treated as false.
 * @param [optional] aReferrer
 *        If aDocument is null, then this will be used as the referrer.
 *        There will be no security check.
 */
opens a new tab with the given URL.
@param aURL
The URL to open (as a string).
@param aDocument
The document from which the URL came, or null. This is used to set the
referrer header and to do a security check of whether the document is
allowed to reference the URL. If null, there will be no referrer
header and no security check.
@param aPostData
Form POST data, or null.
@param aEvent
The triggering event (for the purpose of determining whether to open
in the background), or null.
@param aAllowThirdPartyFixup
If true, then we allow the URL text to be sent to third party services
for interpretation. This parameter may
be undefined in which case it is treated as false.
@param [optional] aReferrer
If aDocument is null, then this will be used as the referrer.
There will be no security check.
opens a new tab with the given URL . @param aURL The URL to open ( as a string ) . @param aDocument The document from which the URL came or null . This is used to set the referrer header and to do a security check of whether the document is allowed to reference the URL . If null there will be no referrer header and no security check . @param aPostData Form POST data or null . @param aEvent The triggering event ( for the purpose of determining whether to open in the background ) or null . @param aAllowThirdPartyFixup If true then we allow the URL text to be sent to third party services for interpretation . This parameter may be undefined in which case it is treated as false . @param [ optional ] aReferrer If aDocument is null then this will be used as the referrer . There will be no security check .
function openNewTabWith(aURL, aDocument, aPostData, aEvent,
                        aAllowThirdPartyFixup, aReferrer) {
  if (aDocument)
    urlSecurityCheck(aURL, aDocument.nodePrincipal);
  var originCharset = aDocument && aDocument.characterSet;
  if (!originCharset &&
      document.documentElement.getAttribute("windowtype") == "navigator:browser")
    originCharset = window.content.document.characterSet;
  openLinkIn(aURL, aEvent && aEvent.shiftKey ? "tabshifted" : "tab",
             { charset: originCharset,
               postData: aPostData,
               allowThirdPartyFixup: aAllowThirdPartyFixup,
               referrerURI: aDocument ? aDocument.documentURIObject : aReferrer });
}
function openNewTabWith ( aURL , aDocument , aPostData , aEvent , aAllowThirdPartyFixup , aReferrer ) { if ( aDocument ) urlSecurityCheck ( aURL , aDocument . nodePrincipal ) ; var originCharset = aDocument && aDocument . characterSet ; if ( ! originCharset && document . documentElement . getAttribute ( "windowtype" ) == "navigator:browser" ) originCharset = window . content . document . characterSet ; openLinkIn ( aURL , aEvent && aEvent . shiftKey ? "tabshifted" : "tab" , { charset : originCharset , postData : aPostData , allowThirdPartyFixup : aAllowThirdPartyFixup , referrerURI : aDocument ? aDocument . documentURIObject : aReferrer } ) ; }
openNewTabWith: opens a new tab with the given URL.
openNewTabWith : opens a new tab with the given URL .
// As in openNewWindowWith(), we want to pass the charset of the // current document over to a new tab.