famo.us: how to handle textbox.onchange events

后端 未结 2 1969
面向向阳花
面向向阳花 2021-01-28 06:30

I don\'t see any tutorials with text input on famo.us university. How can I add a text box surface to my app and handle onchange events?

2条回答
  •  [愿得一人]
    2021-01-28 07:17

    You could just compose 'select' element and put it as content to the surface. After that, create listener for this surface: surface.on('deploy', method). In that method find created 'select' via document.querySelector and set onchange handler in which just emit 'change' event to the this._eventOutput/whatever.

    Actual coffee file see here: https://gist.github.com/extempl/346c045c6c71b3345ac3

提交回复
热议问题