Updating attribute event handler should replace the existing attribute event listener

We should not remove the old existing attribute event listener
and then appending the new listener.Instead actually we should
replace the existing attribute event listener with new one.

Bug: 759449
Change-Id: I4bdbd8935dc47dc2fc9f735dee92b1310868312d
Reviewed-on: https://chromium-review.googlesource.com/662087
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501820}
5 files changed