/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Descriptions for what this frontend is currently doing. const ACTIVITY_TYPE = { // Standing by and handling requests normally.
NONE: 0,
// Forcing the target to reload with cache enabled or disabled.
RELOAD: {
WITH_CACHE_ENABLED: 1,
WITH_CACHE_DISABLED: 2,
WITH_CACHE_DEFAULT: 3,
},
// Enabling or disabling the cache without triggering a reload.
ENABLE_CACHE: 3,
DISABLE_CACHE: 4,
};
// The panel's window global is an EventEmitter firing the following events: const EVENTS = { // When a network event is added to the view
REQUEST_ADDED: "NetMonitor:RequestAdded",
// When request headers begin receiving.
UPDATING_REQUEST_HEADERS: "NetMonitor:NetworkEventUpdating:RequestHeaders",
// When request cookies begin receiving.
UPDATING_REQUEST_COOKIES: "NetMonitor:NetworkEventUpdating:RequestCookies",
// When request post data begins receiving.
UPDATING_REQUEST_POST_DATA: "NetMonitor:NetworkEventUpdating:RequestPostData",
// When security information begins receiving.
UPDATING_SECURITY_INFO: "NetMonitor:NetworkEventUpdating:SecurityInfo",
// When response headers begin receiving.
UPDATING_RESPONSE_HEADERS: "NetMonitor:NetworkEventUpdating:ResponseHeaders",
// When response cookies begin receiving.
UPDATING_RESPONSE_COOKIES: "NetMonitor:NetworkEventUpdating:ResponseCookies",
// When event timings begin and finish receiving.
UPDATING_EVENT_TIMINGS: "NetMonitor:NetworkEventUpdating:EventTimings",
RECEIVED_EVENT_TIMINGS: "NetMonitor:NetworkEventUpdated:EventTimings",
// When response content updates receiving.
UPDATING_RESPONSE_CONTENT: "NetMonitor:NetworkEventUpdating:ResponseContent",
// Fired once the connection is established
CONNECTED: "connected",
// When request payload (HTTP details data) are fetched from the backend.
PAYLOAD_READY: "NetMonitor:PayloadReady",
};
const TEST_EVENTS = { // When a network or timeline event is received. // See https://firefox-source-docs.mozilla.org/devtools-user/web_console/remoting/for // more information about what each packet is supposed to deliver.
NETWORK_EVENT: "NetMonitor:NetworkEvent",
NETWORK_EVENT_UPDATED: "NetMonitor:NetworkEventUpdated",
TIMELINE_EVENT: "NetMonitor:TimelineEvent",
// When response content begins receiving.
STARTED_RECEIVING_RESPONSE: "NetMonitor:NetworkEventUpdating:ResponseStart",
// When request headers finish receiving.
RECEIVED_REQUEST_HEADERS: "NetMonitor:NetworkEventUpdated:RequestHeaders",
// When response headers finish receiving.
RECEIVED_RESPONSE_HEADERS: "NetMonitor:NetworkEventUpdated:ResponseHeaders",
// When request cookies finish receiving.
RECEIVED_REQUEST_COOKIES: "NetMonitor:NetworkEventUpdated:RequestCookies",
// When request post data finishes receiving.
RECEIVED_REQUEST_POST_DATA: "NetMonitor:NetworkEventUpdated:RequestPostData",
// When security information finishes receiving.
RECEIVED_SECURITY_INFO: "NetMonitor:NetworkEventUpdated:SecurityInfo",
// When response cookies finish receiving.
RECEIVED_RESPONSE_COOKIES: "NetMonitor:NetworkEventUpdated:ResponseCookies",
const REQUESTS_WATERFALL = {
BACKGROUND_TICKS_MULTIPLE: 5, // ms
BACKGROUND_TICKS_SCALES: 3,
BACKGROUND_TICKS_SPACING_MIN: 10, // px
BACKGROUND_TICKS_COLOR_RGB: [128, 136, 144], // 8-bit value of the alpha component of the tick color
BACKGROUND_TICKS_OPACITY_MIN: 32,
BACKGROUND_TICKS_OPACITY_ADD: 32, // Colors for timing markers (theme colors, see variables.css)
DOMCONTENTLOADED_TICKS_COLOR: "--timing-marker-dom-content-loaded-color",
LOAD_TICKS_COLOR: "--timing-marker-load-color",
HEADER_TICKS_MULTIPLE: 5, // ms
HEADER_TICKS_SPACING_MIN: 60, // px // Reserve extra space for rendering waterfall time label
LABEL_WIDTH: 50, // px
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.