B2G/gecko/browser/components/feeds/src/WebContentConverter.js
/**
   * Returns the <xul:browser> element associated with the given content
   * window.
   *
   * @param aBrowserWindow
   *        The browser window in which the content window is in.
   * @param aContentWindow
   *        The content window. It's possible to pass a child content window
   *        (i.e. the content window of a frame/iframe).
   */
Returns the  element associated with the given content
window.

@param aBrowserWindow
The browser window in which the content window is in.
@param aContentWindow
The content window. It's possible to pass a child content window
.
Returns the element associated with the given content window . @param aBrowserWindow The browser window in which the content window is in . @param aContentWindow The content window . It ' s possible to pass a child content window .
function WCCR__getBrowserForContentWindow(aBrowserWindow, aContentWindow) {
    aContentWindow = aContentWindow.top;
    var browsers = aBrowserWindow.getBrowser().browsers;
    for (var i = 0; i < browsers.length; ++i) {
      if (browsers[i].contentWindow == aContentWindow)
        return browsers[i];
    }
  }
function WCCR__getBrowserForContentWindow ( aBrowserWindow , aContentWindow ) { aContentWindow = aContentWindow . top ; var browsers = aBrowserWindow . getBrowser ( ) . browsers ; for ( var i = 0 ; i < browsers . length ; ++ i ) { if ( browsers [ i ] . contentWindow == aContentWindow ) return browsers [ i ] ; } }
Returns the <xul:browser> element associated with the given content
 window.
Returns the <xul : browser > element associated with the given content window .
// This depends on pseudo APIs of browser.js and tabbrowser.xml