diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm
index d0793d2580d2..7d6274ab1cdf 100644
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -941,45 +941,44 @@ if (Services.prefs.getBoolPref("privacy.panicButton.enabled")) {
break;
}
},
- get markup() {
- return `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- `;
- },
onViewShowing(aEvent) {
let win = aEvent.target.ownerGlobal;
let doc = win.document;
let eventBlocker = null;
if (!doc.querySelector("#PanelUI-panic-timeframe")) {
win.MozXULElement.insertFTLIfNeeded("browser/panicButton.ftl");
- aEvent.target.appendChild(this.constructor.fragment);
+ let frag = win.MozXULElement.parseXULToFragment(`
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `);
+
+ aEvent.target.appendChild(frag);
eventBlocker = doc.l10n.translateElements([aEvent.target]);
}
diff --git a/browser/components/preferences/in-content/main.js b/browser/components/preferences/in-content/main.js
index 56ac46c01e47..b55a812af3f4 100644
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -3093,40 +3093,32 @@ function getLocalHandlerApp(aFile) {
return localHandlerApp;
}
+// eslint-disable-next-line no-undef
+let gHandlerListItemFragment = MozXULElement.parseXULToFragment(`
+
+
+
+
+
+
+
+
+
+
+
+
+
+`);
+
/**
* This is associated to elements in the handlers view.
*/
class HandlerListItem {
- static get fragment() {
- if (!this.hasOwnProperty("_fragment")) {
- this._fragment = MozXULElement.parseXULToFragment(this.markup);
- }
- return document.importNode(this._fragment, true);
- }
-
- static get markup() {
- return `
-
-
-
-
-
-
-
-
-
-
-
-
-
- `;
- }
-
static forNode(node) {
return gNodeToObjectMap.get(node);
}
@@ -3147,7 +3139,7 @@ class HandlerListItem {
}
createNode(list) {
- list.appendChild(this.constructor.fragment);
+ list.appendChild(document.importNode(gHandlerListItemFragment, true));
this.node = list.lastChild;
gNodeToObjectMap.set(this.node, this);
}
diff --git a/toolkit/mozapps/extensions/content/aboutaddons.js b/toolkit/mozapps/extensions/content/aboutaddons.js
index 1a56668eada7..42a3b81ad7b9 100644
--- a/toolkit/mozapps/extensions/content/aboutaddons.js
+++ b/toolkit/mozapps/extensions/content/aboutaddons.js
@@ -2170,31 +2170,20 @@ class FiveStarRating extends HTMLElement {
customElements.define("five-star-rating", FiveStarRating);
class ContentSelectDropdown extends HTMLElement {
- static get markup() {
- return `
-
-
-
- `;
- }
-
- static get fragment() {
- if (!this.constructor.hasOwnProperty("_fragment")) {
- this.constructor._fragment = MozXULElement.parseXULToFragment(
- this.constructor.markup
- );
- }
- return document.importNode(this.constructor._fragment, true);
- }
-
connectedCallback() {
if (this.children.length) {
return;
}
// This creates the menulist and menupopup elements needed for the inline
// browser to support