B2G/gecko/toolkit/devtools/webconsole/NetworkHelper.jsm
/**
   * Reads the posted text from the page's cache, given an nsIWebNavigation
   * object.
   *
   * @param nsIWebNavigation aWebNav
   * @param string aCharset
   * @returns string or null
   *          Returns the posted string if it was possible to read from
   *          aWebNav, otherwise null.
   */
Reads the posted text from the page's cache, given an nsIWebNavigation
object.

@param nsIWebNavigation aWebNav
@param string aCharset
@returns string or null
Returns the posted string if it was possible to read from
aWebNav, otherwise null.
Reads the posted text from the page ' s cache given an nsIWebNavigation object . @param nsIWebNavigation aWebNav @param string aCharset @returns string or null Returns the posted string if it was possible to read from aWebNav otherwise null .
function NH_readPostTextFromPageViaWebNav(aWebNav, aCharset)
  {
    if (aWebNav instanceof Ci.nsIWebPageDescriptor) {
      let descriptor = aWebNav.currentDescriptor;
      if (descriptor instanceof Ci.nsISHEntry && descriptor.postData &&
          descriptor instanceof Ci.nsISeekableStream) {
        descriptor.seek(NS_SEEK_SET, 0);
        return this.readAndConvertFromStream(descriptor, aCharset);
      }
    }
    return null;
  }
function NH_readPostTextFromPageViaWebNav ( aWebNav , aCharset ) { if ( aWebNav instanceof Ci . nsIWebPageDescriptor ) { let descriptor = aWebNav . currentDescriptor ; if ( descriptor instanceof Ci . nsISHEntry && descriptor . postData && descriptor instanceof Ci . nsISeekableStream ) { descriptor . seek ( NS_SEEK_SET , 0 ) ; return this . readAndConvertFromStream ( descriptor , aCharset ) ; } } return null ; }
Reads the posted text from the page's cache, given an nsIWebNavigation
 object.
Reads the posted text from the page ' s cache given an nsIWebNavigation object .