From 4132af0d50104bfe9d6dbecfd529d1e18660b9c9 Mon Sep 17 00:00:00 2001 From: Mark Striemer Date: Wed, 23 Nov 2022 00:05:56 +0000 Subject: [PATCH] Bug 1801426 - Update to lit@2.4.1 r=hjones Differential Revision: https://phabricator.services.mozilla.com/D162436 --- toolkit/content/vendor/lit/moz.yaml | 4 ++-- toolkit/content/widgets/vendor/lit.all.mjs | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/toolkit/content/vendor/lit/moz.yaml b/toolkit/content/vendor/lit/moz.yaml index 381f52e9e2d6..b4948b29702f 100644 --- a/toolkit/content/vendor/lit/moz.yaml +++ b/toolkit/content/vendor/lit/moz.yaml @@ -10,8 +10,8 @@ origin: "Lit is a simple library for building fast, lightweight web components." url: "https://github.com/lit/lit" license: "BSD-3-Clause" - release: "lit@2.4.0" - revision: "1e1e2e00e3ff655e6f48a42b2e739f47dc681420" + release: lit@2.4.1 (2022-11-03T15:20:49-07:00). + revision: lit@2.4.1 # Since this tracks the latest tag, it's possible that lit isn't the latest tag diff --git a/toolkit/content/widgets/vendor/lit.all.mjs b/toolkit/content/widgets/vendor/lit.all.mjs index c0fe47dc3984..a7999a4d0dc7 100644 --- a/toolkit/content/widgets/vendor/lit.all.mjs +++ b/toolkit/content/widgets/vendor/lit.all.mjs @@ -282,8 +282,8 @@ class ReactiveElement extends HTMLElement { */ static addInitializer(initializer) { var _a; - (_a = this._initializers) !== null && _a !== void 0 ? _a : (this._initializers = []); - this._initializers.push(initializer); + this.finalize(); + ((_a = this._initializers) !== null && _a !== void 0 ? _a : (this._initializers = [])).push(initializer); } /** * Returns a list of attributes corresponding to the registered properties. @@ -427,6 +427,12 @@ class ReactiveElement extends HTMLElement { // finalize any superclasses const superCtor = Object.getPrototypeOf(this); superCtor.finalize(); + // Create own set of initializers for this class if any exist on the + // superclass and copy them down. Note, for a small perf boost, avoid + // creating initializers unless needed. + if (superCtor._initializers !== undefined) { + this._initializers = [...superCtor._initializers]; + } this.elementProperties = new Map(superCtor.elementProperties); // initialize Map populated in observedAttributes this.__attributeToPropertyMap = new Map(); @@ -1009,7 +1015,7 @@ ReactiveElement.shadowRootOptions = { mode: 'open' }; polyfillSupport$2 === null || polyfillSupport$2 === void 0 ? void 0 : polyfillSupport$2({ ReactiveElement }); // IMPORTANT: do not change the property name or the assignment expression. // This line will be used in regexes to search for ReactiveElement usage. -((_d$1 = global$1.reactiveElementVersions) !== null && _d$1 !== void 0 ? _d$1 : (global$1.reactiveElementVersions = [])).push('1.4.1'); +((_d$1 = global$1.reactiveElementVersions) !== null && _d$1 !== void 0 ? _d$1 : (global$1.reactiveElementVersions = [])).push('1.4.2'); /** * @license