use event handlers for javascript
sync versions