Name Description Size
.eslintrc.js 439
accessibility.js Mapping of text size to contrast ratio score levels 6153
async-storage.js Adapted from https://github.com/mozilla-b2g/gaia/blob/f09993563fb5fec4393eb71816ce76cb00463190/shared/js/async_storage.js (converted to use Promises instead of callbacks). This file defines an asynchronous version of the localStorage API, backed by an IndexedDB database. It creates a global asyncStorage object that has methods like the localStorage object. To store a value use setItem: asyncStorage.setItem("key", "value"); This returns a promise in case you want confirmation that the value has been stored. asyncStorage.setItem("key", "newvalue").then(function() { console.log("new value stored"); }); To read a value, call getItem(), but note that you must wait for a promise resolution for the value to be retrieved. asyncStorage.getItem("key").then(function(value) { console.log("The value of key is:", value); }); Note that unlike localStorage, asyncStorage does not allow you to store and retrieve values by setting and querying properties directly. You cannot just write asyncStorage.key; you have to explicitly call setItem() or getItem(). removeItem(), clear(), length(), and key() are like the same-named methods of localStorage, and all return a promise. The asynchronous nature of getItem() makes it tricky to retrieve multiple values. But unlike localStorage, asyncStorage does not require the values you store to be strings. So if you need to save multiple values and want to retrieve them together, in a single asynchronous operation, just group the values into a single object. The properties of this object may not include DOM elements, but they may include things like Blobs and typed arrays. 6530
async-utils.js Helpers for async functions. An async function returns a Promise for the resolution of the function. When the function returns, the promise is resolved with the returned value. If it throws the promise rejects with the thrown error. 2357
commands
compatibility
constants.js Constants used in various panels, shared between client and the server. 5894
content-observer.js Handles adding an observer for the creation of content document globals, event sent immediately after a web content document window has been set up, but before any script code has been executed. 2105
css
debounce.js Create a debouncing function wrapper to only call the target function after a certain amount of time has passed without it being called. @param {Function} func The function to debounce @param {number} wait The wait period @param {Object} scope The scope to use for func @return {Function} The debounced function, which has a `cancel` method that the consumer can call to cancel any pending setTimeout callback. 1221
DevToolsInfaillibleUtils.sys.mjs The 3 methods here are duplicated from ThreadSafeDevToolsUtils.js The ones defined here are used from other sys.mjs files, mostly from the NetworkObserver codebase, while the ones remaining in ThreadSafeDevToolsUtils.js are used in commonjs modules, including modules which can be loaded in workers. sys.mjs modules are currently not supported in workers, see Bug 1247687. 2960
DevToolsUtils.js globals setImmediate, rpc 31506
discovery
dom-helpers.js A simple way to be notified (once) when a window becomes interactive (DOMContentLoaded). It is based on the chromeEventHandler. This is useful when chrome iframes are loaded in content docshells (in Firefox tabs for example). @param nsIDOMWindow win The content window, owning the document to traverse. @param Function callback The method to call when the frame is loaded. @param String targetURL (optional) Check that the frame URL corresponds to the provided URL before calling the callback. 1855
dom-node-constants.js 783
dom-node-filter-constants.js 708
event-emitter.js Registers an event `listener` that is called every time events of specified `type` is emitted on the given event `target`. @param {Object} target Event target object. @param {String} type The type of event. @param {Function|Object} listener The listener that processes the event. @param {Object} options @param {AbortSignal} options.signal The listener will be removed when linked AbortController’s abort() method is called @returns {Function} A function that removes the listener when called. 13452
extend.js Utility function, that is useful for creating objects that inherit from other objects, without associated classes. Replacement for `extends` API from "sdk/core/heritage". 548
flags.js This module controls various global flags that can be toggled on and off. These flags are generally used to change the behavior of the code during testing. They are tracked by preferences so that they are propagated between the parent and content processes. The flags are exposed via a module as a conveniene and to stop from littering preference names throughout the code ase. Each of the flags is documented where it is defined. 2593
generate-uuid.js Returns a new `uuid`. 334
heapsnapshot
images
indentation.js Get the number of indentation units to use to indent a "block" and a boolean indicating whether indentation must be done using tabs. @return {Object} an object of the form {indentUnit, indentWithTabs}. |indentUnit| is the number of indentation units to use to indent a "block". |indentWithTabs| is a boolean which is true if indentation should be done using tabs. 5224
indexed-db.js This indexedDB helper is a simplified version of sdk/indexed-db. It creates a DB with a principal dedicated to DevTools. 1330
inspector
jar.mn 938
jsbeautify
l10n.js Memoized getter for properties files that ensures a given url is only required and parsed once. @param {String} url The URL of the properties file to parse. @return {Object} parsed properties mapped in an object. 8550
layout
loader
locales
moz.build 1799
natural-sort.js Figures whether a given string should be considered by naturalSort to be a Date, and returns the Date's timestamp if so. Some Date formats, like single numbers and MM.DD.YYYY, are not supported due to conflicts with things like version numbers. 5183
network-observer
node-properties
path.js Join all the arguments together and normalize the resulting URI. The initial path must be an full URI with a protocol (i.e. http://). 616
performance-new
picker-constants.js Types of content pickers that can be triggered from DevTools. Used for instance by RDM to keep track of which picker is currently enabled. 446
platform
plural-form.js The code below is mostly is a slight modification of the now removed intl/locale/PluralForm.jsm that removes dependencies on chrome privileged APIs. To make maintenance easier, this file is kept as close as possible to the original in terms of implementation. The modified methods here are - makeGetter (remove code adding the caller name to the log) - get ruleNum() (rely on LocalizationHelper instead of String.services) - log() (rely on console.log) Disable eslint warnings to preserve original code style. 7060
protocol
protocol.js 1305
qrcode
security
specs
sprintfjs
storage
system.js Information from nsIXULAppInfo, regarding the application itself. 5587
test-helpers
tests
ThreadSafeDevToolsUtils.js General utilities used throughout devtools that can also be used in workers. 9812
throttle.js 1952
transport
validate-breakpoint.sys.mjs Given a breakpoint location object, throws if the breakpoint look invalid 1203
wasm-source-map.js SourceMapConsumer for WebAssembly source maps. It transposes columns with lines, which allows mapping data to be used with SpiderMonkey Debugger API. 2610
webconsole
webextension-fallback.html 313
worker