Skip to content

Review Feedback for FF17 #2027

brendandahl opened this Issue Aug 26, 2012 · 1 comment

2 participants


::: browser/extensions/pdfjs/components/PdfStreamConverter.js
@@ +327,5 @@

  • }
  • if (!notificationBox) {
  • log('Unable to get a notification box for the fallback message');
  • return;
  • }

This is ok for now but I don't think you need the loop here, you can just directly get the main window for the child document using >something like this

I think there may also be a frameElement property on one of those interfaces that gives you the browser element for the child >window too.


All that code can just be:

var containingBrowser = domWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebNavigation).QueryInterface(Ci.nsIDocShell).chromeEventHandler;
var chromeWindow = containingBrowser.ownerDocument.defaultView;
var notificationBox = chromeWindow.getNotificationBox(containingBrowser);

If you want to handle windows that aren't in Firefox chrome windows, you should null check chromeWindow.getNotificationBox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.