Moves language initialization to `willUpdate` to prevent blocking connected callback and attaching listeners
23 lines
592 B
Plaintext
23 lines
592 B
Plaintext
{
|
|
"Btrix Component": {
|
|
"scope": "javascript,typescript",
|
|
"prefix": ["component", "@customElement"],
|
|
"body": [
|
|
"import { localized } from \"@lit/localize\";",
|
|
"import { html } from \"lit\";",
|
|
"import { customElement } from \"lit/decorators.js\";",
|
|
"",
|
|
"import { BtrixElement } from \"@/classes/BtrixElement\";",
|
|
"",
|
|
"@customElement(\"btrix-${1:component}\")",
|
|
"@localized()",
|
|
"export class ${2:Component} extends BtrixElement {",
|
|
"\trender() {",
|
|
"\t\treturn html``;",
|
|
"\t}",
|
|
"}",
|
|
""
|
|
]
|
|
}
|
|
}
|