tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 91f03bda7849df83d296766b1967fcb9701b8297
parent f25e9425a3177181609cf7f55f00a770970c879f
Author: Yunju Lee <yunjulee@google.com>
Date:   Fri, 12 Dec 2025 13:03:32 +0000

Bug 2004268 - Turn devtools/client/netmonitor/src/app.js into an ES class. r=devtools-reviewers,nchevobbe

Differential Revision: https://phabricator.services.mozilla.com/D276131

Diffstat:
Mdevtools/client/netmonitor/src/app.js | 21+++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/devtools/client/netmonitor/src/app.js b/devtools/client/netmonitor/src/app.js @@ -44,14 +44,15 @@ const SearchDispatcher = require("resource://devtools/client/netmonitor/src/work * * This object can be consumed by other panels (e.g. Console * is using inspectRequest), by the Launchpad (bootstrap), etc. - * - * @param {object} api An existing API object to be reused. */ -function NetMonitorApp(api) { - this.api = api; -} +class NetMonitorApp { + /** + * @param {object} api An existing API object to be reused. + */ + constructor(api) { + this.api = api; + } -NetMonitorApp.prototype = { async bootstrap({ toolbox, document }) { // Get the root element for mounting. this.mount = document.querySelector("#mount"); @@ -104,7 +105,7 @@ NetMonitorApp.prototype = { ), this.mount ); - }, + } /** * Clean up (unmount from DOM, remove listeners, disconnect). @@ -122,7 +123,7 @@ NetMonitorApp.prototype = { // Prevents any further action from being dispatched this.api.store.dispatch(START_IGNORE_ACTION); - }, + } /** * Selects the specified request in the waterfall and opens the details view. @@ -162,7 +163,7 @@ NetMonitorApp.prototype = { this.api.on(EVENTS.REQUEST_ADDED, inspector); } }); - }, -}; + } +} exports.NetMonitorApp = NetMonitorApp;