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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js

Issue 651403002: Fix trivial type-check errors in file_manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and correct a comment. Created 6 years, 2 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: ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
index 20e6897f66dd5aab2bd4b5d571e43b073ecb6812..59b7c8320aacbabf0211577b6a5b89536ed25060 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
@@ -100,25 +100,25 @@ function FileManagerUI(element, dialogType) {
/**
* Toggle-view button.
- * @type {HTMLElement}
+ * @type {Element}
*/
this.toggleViewButton = null;
/**
* File type selector in the footer.
- * @type {HTMLElement}
+ * @type {HTMLSelectElement}
*/
this.fileTypeSelector = null;
/**
* OK button in the footer.
- * @type {HTMLElement}
+ * @type {HTMLButtonElement}
*/
this.okButton = null;
/**
* Cancel button in the footer.
- * @type {HTMLElement}
+ * @type {HTMLButtonElement}
*/
this.cancelButton = null;
@@ -151,9 +151,12 @@ FileManagerUI.prototype.initDialogType_ = function() {
var parentPanelOfButtons = this.element_.ownerDocument.querySelector(
!hasFooterPanel ? '.preview-panel' : '.dialog-footer');
parentPanelOfButtons.classList.add('button-panel');
- this.fileTypeSelector = parentPanelOfButtons.querySelector('.file-type');
- this.okButton = parentPanelOfButtons.querySelector('.ok');
- this.cancelButton = parentPanelOfButtons.querySelector('.cancel');
+ this.fileTypeSelector = /** @type {!HTMLSelectElement} */
+ (parentPanelOfButtons.querySelector('.file-type'));
+ this.okButton = /** @type {!HTMLButtonElement} */
+ (parentPanelOfButtons.querySelector('.ok'));
+ this.cancelButton = /** @type {!HTMLButtonElement} */
+ (parentPanelOfButtons.querySelector('.cancel'));
// Set attributes.
var okLabel = str('OPEN_LABEL');

Powered by Google App Engine
This is Rietveld 408576698