browsertrix/.vscode/snippets.code-snippets
sua yoo 9597cb1062
chore: Prevent blocking connected callback (#2244)
Moves language initialization to `willUpdate` to prevent blocking
connected callback and attaching listeners
2024-12-17 09:29:51 -08:00

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}",
"}",
""
]
}
}