B2G/gecko/toolkit/mozapps/extensions/test/browser/browser_dragdrop.js
// closecallback is called when the window is closed
closecallback is called when the window is closed
closecallback is called when the window is closed
function WindowOpenListener(url, opencallback, closecallback) {
  this.url = url;
  this.opencallback = opencallback;
  this.closecallback = closecallback;
  var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                     .getService(Components.interfaces.nsIWindowMediator);
  wm.addListener(this);
}
function WindowOpenListener ( url , opencallback , closecallback ) { this . url = url ; this . opencallback = opencallback ; this . closecallback = closecallback ; var wm = Components . classes [ "@mozilla.org/appshell/window-mediator;1" ] . getService ( Components . interfaces . nsIWindowMediator ) ; wm . addListener ( this ) ; }
closecallback is called when the window is closed
closecallback is called when the window is closed