B2G/gecko/browser/base/content/browser.js
// imageElement - image to load in the Media Tab of the Page Info window; can be null/omitted
image to load in the Media Tab of the Page Info window; can be null/omitted
image to load in the Media Tab of the Page Info window ; can be null / omitted
function BrowserPageInfo(doc, initialTab, imageElement) {
  var args = {doc: doc, initialTab: initialTab, imageElement: imageElement};
  var windows = Cc['@mozilla.org/appshell/window-mediator;1']
                  .getService(Ci.nsIWindowMediator)
                  .getEnumerator("Browser:page-info");
  var documentURL = doc ? doc.location : window.content.document.location;
  while (windows.hasMoreElements()) {
    var currentWindow = windows.getNext();
    if (currentWindow.document.documentElement.getAttribute("relatedUrl") == documentURL) {
      currentWindow.focus();
      currentWindow.resetPageInfo(args);
      return currentWindow;
    }
  }
  return openDialog("chrome://browser/content/pageinfo/pageInfo.xul", "",
                    "chrome,toolbar,dialog=no,resizable", args);
}
function BrowserPageInfo ( doc , initialTab , imageElement ) { var args = { doc : doc , initialTab : initialTab , imageElement : imageElement } ; var windows = Cc [ '@mozilla.org/appshell/window-mediator;1' ] . getService ( Ci . nsIWindowMediator ) . getEnumerator ( "Browser:page-info" ) ; var documentURL = doc ? doc . location : window . content . document . location ; while ( windows . hasMoreElements ( ) ) { var currentWindow = windows . getNext ( ) ; if ( currentWindow . document . documentElement . getAttribute ( "relatedUrl" ) == documentURL ) { currentWindow . focus ( ) ; currentWindow . resetPageInfo ( args ) ; return currentWindow ; } } return openDialog ( "chrome://browser/content/pageinfo/pageInfo.xul" , "" , "chrome,toolbar,dialog=no,resizable" , args ) ; }
imageElement - image to load in the Media Tab of the Page Info window; can be null/omitted
imageElement - image to load in the Media Tab of the Page Info window ; can be null / omitted
// Check for windows matching the url // We didn't find a matching window, so open a new one.