Rename initialize to initialise in better.js

This commit is contained in:
Talia 2021-06-30 13:54:37 +02:00
parent 397d294f41
commit 3c7109155e
No known key found for this signature in database
GPG Key ID: AD727AD22802D0D6
1 changed files with 3 additions and 2 deletions

View File

@ -16,7 +16,7 @@ Example:
userNameChanged(name) { this.shadowRoot.querySelector('[part="name"]').innerHTML = this.userName; } userNameChanged(name) { this.shadowRoot.querySelector('[part="name"]').innerHTML = this.userName; }
} }
FooBar.initialize() FooBar.initialise()
*/ */
export class Better extends HTMLElement { export class Better extends HTMLElement {
@ -64,7 +64,7 @@ export class Better extends HTMLElement {
} }
// Adds property/attribute mappings to the object. // Adds property/attribute mappings to the object.
static initialize(name = this.name) { static initialise(name = this.name) {
const names = Object const names = Object
.getOwnPropertyNames(this.prototype) .getOwnPropertyNames(this.prototype)
.filter(name => name.search(/Changed$/)+1) .filter(name => name.search(/Changed$/)+1)
@ -87,4 +87,5 @@ export class Better extends HTMLElement {
customElements.define(name, this) customElements.define(name, this)
return name return name
} }
static initialize(name) { this.initialise(name) }
} }