Well, it's compiling, and a valid way to do it, I ...
# javascript
t
Well, it's compiling, and a valid way to do it, I guess. One detail,
Copy code
kotlin
    window.customElements.define("fancy-button",  ::FancyButton,  object : ElementDefinitionOptions {
        override var extends: String? = "button"
    })
It's not really doing what I want. The JavaScript version take a reference of
FancyButton
. I think the define function will do
new FancyButton()
. The problem here, the compiled code is not working because it's trying to
new (function ()  {return new FancyButton()})