Bug 1801426 - Update to lit@2.4.1 r=hjones

Differential Revision: https://phabricator.services.mozilla.com/D162436
This commit is contained in:
Mark Striemer 2022-11-23 00:05:56 +00:00
parent f1b3d2fa50
commit 4132af0d50
2 changed files with 11 additions and 5 deletions

View file

@ -10,8 +10,8 @@ origin:
"Lit is a simple library for building fast, lightweight web components." "Lit is a simple library for building fast, lightweight web components."
url: "https://github.com/lit/lit" url: "https://github.com/lit/lit"
license: "BSD-3-Clause" license: "BSD-3-Clause"
release: "lit@2.4.0" release: lit@2.4.1 (2022-11-03T15:20:49-07:00).
revision: "1e1e2e00e3ff655e6f48a42b2e739f47dc681420" revision: lit@2.4.1
# Since this tracks the latest tag, it's possible that lit isn't the latest tag # Since this tracks the latest tag, it's possible that lit isn't the latest tag

View file

@ -282,8 +282,8 @@ class ReactiveElement extends HTMLElement {
*/ */
static addInitializer(initializer) { static addInitializer(initializer) {
var _a; var _a;
(_a = this._initializers) !== null && _a !== void 0 ? _a : (this._initializers = []); this.finalize();
this._initializers.push(initializer); ((_a = this._initializers) !== null && _a !== void 0 ? _a : (this._initializers = [])).push(initializer);
} }
/** /**
* Returns a list of attributes corresponding to the registered properties. * Returns a list of attributes corresponding to the registered properties.
@ -427,6 +427,12 @@ class ReactiveElement extends HTMLElement {
// finalize any superclasses // finalize any superclasses
const superCtor = Object.getPrototypeOf(this); const superCtor = Object.getPrototypeOf(this);
superCtor.finalize(); 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); this.elementProperties = new Map(superCtor.elementProperties);
// initialize Map populated in observedAttributes // initialize Map populated in observedAttributes
this.__attributeToPropertyMap = new Map(); this.__attributeToPropertyMap = new Map();
@ -1009,7 +1015,7 @@ ReactiveElement.shadowRootOptions = { mode: 'open' };
polyfillSupport$2 === null || polyfillSupport$2 === void 0 ? void 0 : polyfillSupport$2({ ReactiveElement }); polyfillSupport$2 === null || polyfillSupport$2 === void 0 ? void 0 : polyfillSupport$2({ ReactiveElement });
// IMPORTANT: do not change the property name or the assignment expression. // IMPORTANT: do not change the property name or the assignment expression.
// This line will be used in regexes to search for ReactiveElement usage. // 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 * @license