context:   onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus)  {    // Use this to access onStateChange flags    const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;    var requestSpec;    try {      var channel = aRequest.QueryInterface(Components.interfaces.nsIChannel);      if (channel)        requestSpec = StripUsernamePasswordFromURI(channel.URI);    } catch (e) {      if ( gShowDebugOutputStateChange)        dump("***** onStateChange; NO REQUEST CHANNEL\n");    }    if (gShowDebugOutputStateChange)    {      dump("***** onStateChange request: " + requestSpec + "\n");      dump("      state flags: ");      if (aStateFlags & nsIWebProgressListener.STATE_START)        dump(" STATE_START, ");      if (aStateFlags & nsIWebProgressListener.STATE_STOP)        dump(" STATE_STOP, ");      if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK)        dump(" STATE_IS_NETWORK ");      dump("\n");    }    // Detect end of file upload of HTML file:    if (gPublishData)    {      var pubSpec = gPublishData.publishUrl + gPublishData.docDir + gPublishData.filename;      if ((aStateFlags & nsIWebProgressListener.STATE_STOP) &&          (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK)           && requestSpec && requestSpec == pubSpec)      {        // Get the new docUrl from the "browse location" in case "publish location" was FTP        var urlstring = GetDocUrlFromPublishData(gPublishData);                if (aStatus)        {          // we should provide more meaningful errors (if possible)          var saveDocStr = GetString("Publish");          var failedStr = GetString("PublishFailed");          AlertWithTitle(saveDocStr, failedStr);          return;  // we don't want to change location or reset mod count, etc.        }        try {          window.editorShell.doAfterSave(true, urlstring);  // we need to update the url before notifying listeners          var editor = window.editorShell.editor.QueryInterface(Components.interfaces.nsIEditor);          editor.resetModificationCount();          // this should cause notification to listeners that doc has changed          // Set UI based on whether we're editing a remote or local url          SetSaveAndPublishUI(urlstring);        } catch (e) {}      }    }  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6d3ab2a726e1c8dbddb9edf5267f0be7bc84f07a/ComposerCommands.js/buggy/editor/ui/composer/content/ComposerCommands.js