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

Unified Diff: ui/webui/resources/js/cr/ui/alert_overlay.js

Issue 454223004: Typecheck JS files for chrome://history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@B_download
Patch Set: right rebase, switched to gyp Created 6 years, 4 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/webui/resources/js/cr/ui/alert_overlay.js
diff --git a/ui/webui/resources/js/cr/ui/alert_overlay.js b/ui/webui/resources/js/cr/ui/alert_overlay.js
index 76ec5014d39d521eb6880cd82d850361a1abb954..594dbb83a584b38de936707a1b92c7a52ec0f4fa 100644
--- a/ui/webui/resources/js/cr/ui/alert_overlay.js
+++ b/ui/webui/resources/js/cr/ui/alert_overlay.js
@@ -16,8 +16,8 @@ cr.define('alertOverlay', function() {
var cancelButton;
function initialize(e) {
- okButton = $('alertOverlayOk');
- cancelButton = $('alertOverlayCancel');
+ okButton = /** @type {HTMLButtonElement} */($('alertOverlayOk'));
Dan Beam 2014/08/19 00:31:53 why do these need to be buttons?
Vitaly Pavlenko 2014/08/19 18:30:27 Done.
+ cancelButton = /** @type {HTMLButtonElement} */($('alertOverlayCancel'));
// The callbacks are set to the callbacks provided in show(). Clear them
// out when either is clicked.
@@ -46,9 +46,9 @@ cr.define('alertOverlay', function() {
* no button is shown.
* @param {string=} cancelTitle The title of the cancel button. If undefined
* or empty, no button is shown.
- * @param {function=} okCallback A function to be called when the user presses
- * the ok button. Can be undefined if |okTitle| is falsey.
- * @param {function=} cancelCallback A function to be called when the user
+ * @param {function()=} okCallback A function to be called when the user
Dan Beam 2014/08/19 00:31:53 add opt_ prefix
Vitaly Pavlenko 2014/08/19 18:30:27 Done.
+ * presses the ok button. Can be undefined if |okTitle| is falsey.
+ * @param {function()=} cancelCallback A function to be called when the user
* presses the cancel button. Can be undefined if |cancelTitle| is falsey.
*/
function setValues(

Powered by Google App Engine
This is Rietveld 408576698