B2G/gecko/browser/devtools/webconsole/webconsole.js
/**
   * Determine the category of a given nsIScriptError.
   *
   * @param nsIScriptError aScriptError
   *        The script error you want to determine the category for.
   * @return CATEGORY_JS|CATEGORY_CSS
   *         Depending on the script error CATEGORY_JS or CATEGORY_CSS can be
   *         returned.
   */
Determine the category of a given nsIScriptError.
@param nsIScriptError aScriptError
The script error you want to determine the category for.
Determine the category of a given nsIScriptError . @param nsIScriptError aScriptError The script error you want to determine the category for .
function Utils_categoryForScriptError(aScriptError)
  {
    switch (aScriptError.category) {
      case "CSS Parser":
      case "CSS Loader":
        return CATEGORY_CSS;
      default:
        return CATEGORY_JS;
    }
  }
function Utils_categoryForScriptError ( aScriptError ) { switch ( aScriptError . category ) { case "CSS Parser" : case "CSS Loader" : return CATEGORY_CSS ; default : return CATEGORY_JS ; } }
Determine the category of a given nsIScriptError.
Determine the category of a given nsIScriptError .