function EmployeeListView() {
this._html = html;
/../
}
EmployeeListView.prototype = {
registerEmployeeHandler: function (handler) {
syncEmployeeList().bind(this);
}
function syncEmployeeList() {
let elList = this._mHtml.querySelector('#employee');
if (elList)
elList.addEventListener('change', function () {
var employee = document.getElementById("employee").value;
document.querySelectorAll("input[type='text']")[0].value = "";
handler(employee);
});
}
i need help in binding 'this' to syncEmployeeList so that I can avoid passing it as a parameter to the functions, I am unsure of what I am doing wrong