[#239] add event listeners to JS