Fixing error with functions below constructor

This commit is contained in:
metacryst
2024-03-27 15:41:07 -05:00
parent ec2ae3229a
commit 0252b92554
2 changed files with 34 additions and 1 deletions

View File

@@ -118,4 +118,35 @@ testParseClassFieldsWithInnerFunctionVariable() {
}
}
ParseConstructorWithFunctionsBelow() {
class Space extends Shadow {
$$form = Forms.observe(window.location.pathname, this)
render = () => {
ForEach(this.form.children, (form) => {
switch(form.type) {
case "file":
File(form)
break
case "space":
ChildSpace(form)
break
case "link":
Link()
break
}
})
}
constructor() {
super()
}
connectedCallback() {
}
}
window.Registry.parseConstructor(Space)
}
})