Message1335

Author madalu
Recipients XTaran, jrm
Date 2017-04-03.16:16:04
Content
Sorry, I wasn't clear in my earlier post. The method getBrowserForContentWindow is invoked as follows in 
nsLoginManagerPrompter.js:

    let windows = Services.wm.getEnumerator(null);
    while (windows.hasMoreElements()) {
      let win = windows.getNext();
      let browser = win.gBrowser.getBrowserForContentWindow(aWindow);
      if (browser) {
        return { win, browser };
      }
    }
    return null;

So it is a method called on the browser object returned by gBrowser. And I believe it takes an instance of 
nsIDOMWindow as an argument. Its implementation in Seamonkey here (https://api-
dev.bugzilla.mozilla.org/show_bug.cgi?id=1300539#c12) seems to suggest that it is called on an array of 
browser objects.

As I understand it, these methods were not exposed to any of the code conkeror relied on before; conkeror 
itself traditionally just hacked a getBrowser (i.e., gBrowser) method so that it could be called by 
extensions. But now these methods are directly invoked in nsLoginManagerPrompter.
History
Date User Action Args
2017-04-03 16:16:04madalusetmessageid: <1491236164.39.0.612274419383.issue513@bugs.conkeror.org>
2017-04-03 16:16:04madalusetrecipients: + XTaran, jrm
2017-04-03 16:16:04madalulinkissue513 messages
2017-04-03 16:16:04madalucreate