tor-browser

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

commit d979e3c16de7c8fcdac0e0fc82d9af9a321601b9
parent 6fc34fde9274a13bf47cc616e6d1072e6084f8be
Author: Lorenz A <me@lorenzackermann.xyz>
Date:   Tue,  9 Dec 2025 06:48:42 +0000

Bug 2004218 - [devtools] Turn DevToolPanel in devtools/client/framework/test/head.js into an ES class. r=devtools-reviewers,nchevobbe

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

Diffstat:
Mdevtools/client/framework/test/head.js | 25++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/devtools/client/framework/test/head.js b/devtools/client/framework/test/head.js @@ -170,38 +170,37 @@ function waitForSourceLoad(toolbox, url) { * There may be no benefit in doing this as an abstract type, but if nothing * else gives us a place to write documentation. */ -function DevToolPanel(iframeWindow, toolbox) { - EventEmitter.decorate(this); +class DevToolPanel extends EventEmitter { + constructor(iframeWindow, toolbox) { + super(); - this._toolbox = toolbox; - this._window = iframeWindow; -} - -DevToolPanel.prototype = { + this._toolbox = toolbox; + this._window = iframeWindow; + } open() { return new Promise(resolve => { executeSoon(() => { resolve(this); }); }); - }, + } get document() { return this._window.document; - }, + } get target() { return this._toolbox.target; - }, + } get toolbox() { return this._toolbox; - }, + } destroy() { return Promise.resolve(null); - }, -}; + } +} /** * Create a simple devtools test panel that implements the minimum API needed to be