tor-browser

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

commit 4d21c828b11f186b5b9fe8171315f83cd51d1d06
parent 7da92bc455cb85117495ac7d4a11fe1e4040d79e
Author: Lorenz A <me@lorenzackermann.xyz>
Date:   Mon, 15 Dec 2025 09:57:53 +0000

Bug 2004270 - [devtools] Turn devtools/client/netmonitor/panel.js into an ES class. r=devtools-reviewers,nchevobbe

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

Diffstat:
Mdevtools/client/netmonitor/panel.js | 19+++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/devtools/client/netmonitor/panel.js b/devtools/client/netmonitor/panel.js @@ -4,13 +4,12 @@ "use strict"; -function NetMonitorPanel(iframeWindow, toolbox, commands) { - this.panelWin = iframeWindow; - this.toolbox = toolbox; - this.commands = commands; -} - -NetMonitorPanel.prototype = { +class NetMonitorPanel { + constructor(iframeWindow, toolbox, commands) { + this.panelWin = iframeWindow; + this.toolbox = toolbox; + this.commands = commands; + } async open() { // Reuse an existing Network monitor API object if available. // It could have been created for WE API before Net panel opens. @@ -26,12 +25,12 @@ NetMonitorPanel.prototype = { // Ready to go! return this; - }, + } destroy() { this.panelWin.Netmonitor.destroy(); this.emit("destroyed"); - }, -}; + } +} exports.NetMonitorPanel = NetMonitorPanel;