tor-browser

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

commit e4ea0cc287e7d32409375aec35b2922c2ecac4de
parent 6932a8b1522574fe94295457fb6e505511cded5e
Author: Lorenz A <me@lorenzackermann.xyz>
Date:   Mon, 15 Dec 2025 13:03:25 +0000

Bug 2004264 - [devtools] Turn devtools/client/netmonitor/src/har/har-importer.js into an ES class. r=devtools-reviewers,bomsy

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

Diffstat:
Mdevtools/client/netmonitor/src/har/har-importer.js | 15+++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/devtools/client/netmonitor/src/har/har-importer.js b/devtools/client/netmonitor/src/har/har-importer.js @@ -18,18 +18,17 @@ var guid = 0; * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HAR/Overview.html * http://www.softwareishard.com/blog/har-12-spec/ */ -var HarImporter = function (actions) { - this.actions = actions; -}; - -HarImporter.prototype = { +class HarImporter { + constructor(actions) { + this.actions = actions; + } /** * This is the main method used to import HAR data. */ import(har) { const json = JSON.parse(har); this.doImport(json); - }, + } doImport(har) { this.actions.clearRequests({ isExplicitClear: true }); @@ -159,8 +158,8 @@ HarImporter.prototype = { }); } }); - }, -}; + } +} // Exports from this module exports.HarImporter = HarImporter;