The valueChange() function was bound (to this) before both adding and removing the eventListener. In both cases this would create a new reference to the function.
Now the resulting function of the bind is passed to the eventListener, and can be used to remove it in destroy()
The
valueChange()
function was bound (tothis
) before both adding and removing the eventListener. In both cases this would create a new reference to the function.Now the resulting function of the bind is passed to the eventListener, and can be used to remove it in
destroy()