[ci] yarn format
This commit is contained in:
parent
52f8fbe37c
commit
8844bdb920
1 changed files with 7 additions and 3 deletions
|
@ -459,10 +459,14 @@ export async function renderHTMLElement(result: SSRResult, constructor: typeof H
|
||||||
|
|
||||||
function getHTMLElementName(constructor: typeof HTMLElement) {
|
function getHTMLElementName(constructor: typeof HTMLElement) {
|
||||||
const definedName = (customElements as CustomElementRegistry & { getName(_constructor: typeof HTMLElement): string }).getName(constructor);
|
const definedName = (customElements as CustomElementRegistry & { getName(_constructor: typeof HTMLElement): string }).getName(constructor);
|
||||||
if (definedName) return definedName
|
if (definedName) return definedName;
|
||||||
|
|
||||||
const assignedName = constructor.name.replace(/^HTML|Element$/g, '').replace(/[A-Z]/g, '-$&').toLowerCase().replace(/^-/, 'html-')
|
const assignedName = constructor.name
|
||||||
return assignedName
|
.replace(/^HTML|Element$/g, '')
|
||||||
|
.replace(/[A-Z]/g, '-$&')
|
||||||
|
.toLowerCase()
|
||||||
|
.replace(/^-/, 'html-');
|
||||||
|
return assignedName;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderElement(name: string, { props: _props, children = '' }: SSRElement) {
|
function renderElement(name: string, { props: _props, children = '' }: SSRElement) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue