Name Description Size Coverage
.eslintrc.mjs 441 -
accessibility.js Mapping of text size to contrast ratio score levels 6159 -
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. 7235 -
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. 2360 -
commands -
compatibility -
constants.js Constants used in various panels, shared between client and the server. 5934 -
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 31859 -
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. 2215 -
dom-node-constants.js 783 -
dom-node-filter-constants.js 737 -
event-emitter.js Decorate an object with event emitter functionality; basically using the class' prototype as mixin. @param Object target The object to decorate. @return Object The object given, mixed. 11184 -
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 -
highlighters.mjs 839 -
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. 8581 -
layout -
loader -
locales -
mdn.mjs Get a URLSearchParams instance with the proper utm_* parameters @param {string} utmMedium: value for the "utm_medium" parameter @returns {URLSearchParams} 550 -
moz.build 1835 -
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://). 598 -
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 eslint-disable 5205 -
protocol -
protocol.js 1414 -
security -
specs -
sprintfjs -
storage -
string.js Truncate the string and add ellipsis to the middle of the string. 581 -
system.js Information from nsIXULAppInfo, regarding the application itself. 6215 -
test-helpers -
tests -
ThreadSafeDevToolsUtils.js General utilities used throughout devtools that can also be used in workers. 9812 -
throttle.js globals setImmediate 2459 -
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 Web Extension Fallback Document 436 -
worker -