events.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. "use strict";
  2. // The panel's window global is an EventEmitter firing the following events:
  3. const EVENTS = {
  4. // When the monitored target begins and finishes navigating.
  5. TARGET_WILL_NAVIGATE: "NetMonitor:TargetWillNavigate",
  6. TARGET_DID_NAVIGATE: "NetMonitor:TargetNavigate",
  7. // When a network or timeline event is received.
  8. // See https://developer.mozilla.org/docs/Tools/Web_Console/remoting for
  9. // more information about what each packet is supposed to deliver.
  10. NETWORK_EVENT: "NetMonitor:NetworkEvent",
  11. TIMELINE_EVENT: "NetMonitor:TimelineEvent",
  12. // When a network event is added to the view
  13. REQUEST_ADDED: "NetMonitor:RequestAdded",
  14. // When request headers begin and finish receiving.
  15. UPDATING_REQUEST_HEADERS: "NetMonitor:NetworkEventUpdating:RequestHeaders",
  16. RECEIVED_REQUEST_HEADERS: "NetMonitor:NetworkEventUpdated:RequestHeaders",
  17. // When request cookies begin and finish receiving.
  18. UPDATING_REQUEST_COOKIES: "NetMonitor:NetworkEventUpdating:RequestCookies",
  19. RECEIVED_REQUEST_COOKIES: "NetMonitor:NetworkEventUpdated:RequestCookies",
  20. // When request post data begins and finishes receiving.
  21. UPDATING_REQUEST_POST_DATA: "NetMonitor:NetworkEventUpdating:RequestPostData",
  22. RECEIVED_REQUEST_POST_DATA: "NetMonitor:NetworkEventUpdated:RequestPostData",
  23. // When security information begins and finishes receiving.
  24. UPDATING_SECURITY_INFO: "NetMonitor::NetworkEventUpdating:SecurityInfo",
  25. RECEIVED_SECURITY_INFO: "NetMonitor::NetworkEventUpdated:SecurityInfo",
  26. // When response headers begin and finish receiving.
  27. UPDATING_RESPONSE_HEADERS: "NetMonitor:NetworkEventUpdating:ResponseHeaders",
  28. RECEIVED_RESPONSE_HEADERS: "NetMonitor:NetworkEventUpdated:ResponseHeaders",
  29. // When response cookies begin and finish receiving.
  30. UPDATING_RESPONSE_COOKIES: "NetMonitor:NetworkEventUpdating:ResponseCookies",
  31. RECEIVED_RESPONSE_COOKIES: "NetMonitor:NetworkEventUpdated:ResponseCookies",
  32. // When event timings begin and finish receiving.
  33. UPDATING_EVENT_TIMINGS: "NetMonitor:NetworkEventUpdating:EventTimings",
  34. RECEIVED_EVENT_TIMINGS: "NetMonitor:NetworkEventUpdated:EventTimings",
  35. // When response content begins, updates and finishes receiving.
  36. STARTED_RECEIVING_RESPONSE: "NetMonitor:NetworkEventUpdating:ResponseStart",
  37. UPDATING_RESPONSE_CONTENT: "NetMonitor:NetworkEventUpdating:ResponseContent",
  38. RECEIVED_RESPONSE_CONTENT: "NetMonitor:NetworkEventUpdated:ResponseContent",
  39. // When the request post params are displayed in the UI.
  40. REQUEST_POST_PARAMS_DISPLAYED: "NetMonitor:RequestPostParamsAvailable",
  41. // When the response body is displayed in the UI.
  42. RESPONSE_BODY_DISPLAYED: "NetMonitor:ResponseBodyAvailable",
  43. // When the html response preview is displayed in the UI.
  44. RESPONSE_HTML_PREVIEW_DISPLAYED: "NetMonitor:ResponseHtmlPreviewAvailable",
  45. // When the image response thumbnail is displayed in the UI.
  46. RESPONSE_IMAGE_THUMBNAIL_DISPLAYED:
  47. "NetMonitor:ResponseImageThumbnailAvailable",
  48. // When a tab is selected in the NetworkDetailsView and subsequently rendered.
  49. TAB_UPDATED: "NetMonitor:TabUpdated",
  50. // Fired when Sidebar has finished being populated.
  51. SIDEBAR_POPULATED: "NetMonitor:SidebarPopulated",
  52. // Fired when NetworkDetailsView has finished being populated.
  53. NETWORKDETAILSVIEW_POPULATED: "NetMonitor:NetworkDetailsViewPopulated",
  54. // Fired when CustomRequestView has finished being populated.
  55. CUSTOMREQUESTVIEW_POPULATED: "NetMonitor:CustomRequestViewPopulated",
  56. // Fired when charts have been displayed in the PerformanceStatisticsView.
  57. PLACEHOLDER_CHARTS_DISPLAYED: "NetMonitor:PlaceholderChartsDisplayed",
  58. PRIMED_CACHE_CHART_DISPLAYED: "NetMonitor:PrimedChartsDisplayed",
  59. EMPTY_CACHE_CHART_DISPLAYED: "NetMonitor:EmptyChartsDisplayed",
  60. // Fired once the NetMonitorController establishes a connection to the debug
  61. // target.
  62. CONNECTED: "connected",
  63. };
  64. exports.EVENTS = EVENTS;