Name Description Size
accessibility.js Mapping of text size to contrast ratio score levels 6124
acorn 7
adb 12
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. 6217
async-utils.js Helpers for async functions. Async functions are generator functions that are run by Tasks. 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. See Task documentation at https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Task.jsm. 1461
base-loader.js global __URI__ 20397
builtin-modules.js This module defines custom globals injected in all our modules and also pseudo modules that aren't separate files but just dynamically set values. As it does so, the module itself doesn't have access to these globals, nor the pseudo modules. Be careful to avoid loading any other js module as they would also miss them. 12187
client 11
constants.js Constants used in various panels, shared between client and the server. 2753
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. 2230
css 8
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 875
defer.js Returns a deferred object, with a resolve and reject property. https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Promise.jsm/Deferred 638
DevToolsUtils.js globals setImmediate, rpc 28778
discovery 3
dom-node-constants.js globals define 951
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. 10947
execution-point-utils.js 7059
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". 547
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. 2556
fronts 37
generate-uuid.js Returns a new `uuid`. 430
heapsnapshot 30
indentation.js -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- 5366
indexed-db.js This indexedDB helper is a simplified version of sdk/indexed-db. It creates a DB with a principal dedicated to DevTools. 1503
inspector 3
jar.mn 715
jsbeautify 6
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. 9511
layout 3
loader-plugin-raw.jsm A function that can be used as part of a require hook for a loader.js Loader. This function handles "raw!" and "theme-loader!" requires. See also: https://github.com/webpack/raw-loader. 1388
Loader.jsm Manages the base loader (base-loader.js) instance used to load the developer tools. 6756
locales 4
moz.build 1786
node-properties 3
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 4
platform 4
plural-form.js The code below is mostly is a slight modification of 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. 7031
preferences # How is devtools-shared loaded? 2
protocol 11
protocol.js 2344
qrcode 5
screenshot 3
security 7
service-workers-debug-helper.js This helper provides info on whether we can debug service workers or not. This depends both on the current multiprocess (e10s) configuration and on the usage of the new service worker implementation (dom.serviceWorkers.parent_intercept = true). Since this can be changed on the fly, there are subscribe/unsubscribe functions to get notified of this. 2575
specs 47
sprintfjs 3
system.js Information from nsIXULAppInfo, regarding the application itself. 5682
task.js -*- indent-tabs-mode: nil; js-indent-level: 2 -*- 17068
test-helpers 4
tests 3
ThreadSafeDevToolsUtils.js General utilities used throughout devtools that can also be used in workers. 9960
throttle.js 1539
transport 9
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. 2659
webconsole 7
worker 5
.eslintrc.js 234