Commit 86d59963 authored by Naoki Fukino's avatar Naoki Fukino Committed by Commit Bot

[Files] Prefer onclick property to listen click events.

This is a follow-up of CL:2354115.
As only one client listen to the click event of filter buttons, setting
onclick property is sufficient and concise over addEventListener.

Bug: none
Change-Id: I13b5ad9c658c8489ec50a99754db422a79dc5551
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2359594Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798535}
parent 53049602
......@@ -64,7 +64,7 @@ class FileTypeFiltersController {
createFilterButton_(label) {
const button = util.createChild(this.container_, 'file-type-filter-button');
button.textContent = label;
button.addEventListener('click', this.onFilterButtonClicked_.bind(this));
button.onclick = this.onFilterButtonClicked_.bind(this);
return button;
}
......@@ -87,7 +87,7 @@ class FileTypeFiltersController {
/**
* Updates the UI when one of the filter buttons is clicked.
* @param {!Event} event Event.
* @param {Event} event Event.
* @private
*/
onFilterButtonClicked_(event) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment