code: function(type)
      {
          switch (type) {
              case WebInspector.Resource.Type.Document:
                  return "document";
              case WebInspector.Resource.Type.Stylesheet:
                  return "stylesheet";
              case WebInspector.Resource.Type.Image:
                  return "image";
              case WebInspector.Resource.Type.Font:
                  return "font";
              case WebInspector.Resource.Type.Script:
                  return "script";
              case WebInspector.Resource.Type.XHR:
                  return "xhr";
              case WebInspector.Resource.Type.WebSocket:
                  return "websocket";
              case WebInspector.Resource.Type.Other:
              default:
                  return "other";
          }
      }
docs: Returns locale-independent string identifier of resource type (primarily for use in extension API).
  The IDs need to be kept in sync with webInspector.resoureces.Types object in ExtensionAPI.js.
  @param {number} type
  @return {string}