tor-browser

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

commit 37598e5e07b1c1dd4d9a1726d9c8735e4e52be17
parent a3ba0470371be7fc18d6f922c20c790d0d6fd459
Author: Lorenz A <me@lorenzackermann.xyz>
Date:   Fri, 12 Dec 2025 09:24:31 +0000

Bug 2004284 - [devtools] Turn devtools/client/inspector/markup/views/read-only-container.js into an ES class. r=devtools-reviewers,jdescottes

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

Diffstat:
Mdevtools/client/inspector/markup/views/read-only-container.js | 31++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)

diff --git a/devtools/client/inspector/markup/views/read-only-container.js b/devtools/client/inspector/markup/views/read-only-container.js @@ -6,31 +6,28 @@ const ReadOnlyEditor = require("resource://devtools/client/inspector/markup/views/read-only-editor.js"); const MarkupContainer = require("resource://devtools/client/inspector/markup/views/markup-container.js"); -const { extend } = require("resource://devtools/shared/extend.js"); /** * An implementation of MarkupContainer for Pseudo Elements, * Doctype nodes, or any other type generic node that doesn't * fit for other editors. * Does not allow any editing, just viewing / selecting. - * - * @param {MarkupView} markupView - * The markup view that owns this container. - * @param {NodeFront} node - * The node to display. */ -function MarkupReadOnlyContainer(markupView, node) { - MarkupContainer.prototype.initialize.call( - this, - markupView, - node, - "readonlycontainer" - ); +class MarkupReadOnlyContainer extends MarkupContainer { + /** + * + * @param {MarkupView} markupView + * The markup view that owns this container. + * @param {NodeFront} node + * The node to display. + */ + constructor(markupView, node) { + super(); + super.initialize(markupView, node, "readonlycontainer"); - this.editor = new ReadOnlyEditor(this, node); - this.tagLine.appendChild(this.editor.elt); + this.editor = new ReadOnlyEditor(this, node); + this.tagLine.appendChild(this.editor.elt); + } } -MarkupReadOnlyContainer.prototype = extend(MarkupContainer.prototype, {}); - module.exports = MarkupReadOnlyContainer;