Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Unified Diff: chrome/browser/resources/file_manager/js/file_table.js

Issue 12212187: [Cleanup] Files.app: Misc style fixes in Javascript code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/file_table.js
diff --git a/chrome/browser/resources/file_manager/js/file_table.js b/chrome/browser/resources/file_manager/js/file_table.js
index 1c0170b969d601347187cdae4f9147ee6ab91573..225c9d39d084feb3d8c0bec1be5db36e34e314e6 100644
--- a/chrome/browser/resources/file_manager/js/file_table.js
+++ b/chrome/browser/resources/file_manager/js/file_table.js
@@ -553,15 +553,19 @@ filelist.decorateCheckbox = function(input) {
input.addEventListener('mousedown', stopEventPropagation);
input.addEventListener('mouseup', stopEventPropagation);
- var self = this;
- input.addEventListener('click', function(event) {
- // Revert default action and swallow the event
- // if this is a multiple click or Shift is pressed.
- if (event.detail > 1 || event.shiftKey) {
- this.checked = !this.checked;
- stopEventPropagation(event);
- }
- });
+ input.addEventListener(
+ 'click',
+ /**
+ * @this {HTMLInputElement}
+ */
+ function(event) {
+ // Revert default action and swallow the event
+ // if this is a multiple click or Shift is pressed.
+ if (event.detail > 1 || event.shiftKey) {
+ this.checked = !this.checked;
+ stopEventPropagation(event);
+ }
+ });
};
/**

Powered by Google App Engine
This is Rietveld 408576698