MVCoconut / coconut.ui

Wow, such reactive view! Much awesome!
The Unlicense
89 stars 9 forks source link

Automatic function wrapping problem #71

Closed kevinresol closed 3 years ago

kevinresol commented 4 years ago
class Main extends coconut.ui.View {
    static function main() {
        coconut.ui.Renderer.mount(js.Browser.document.getElementById('app'), '<Main/>');
    }
    function render() '<button onclick=${false ? null : click}>click</button>';
    function click() {
        trace('clicked');
    }
}

This is essentially compiled into onclick=${()->{false ? null : click}} which is not my intention

back2dos commented 3 years ago

This is an issue in hxx.