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

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: fixed issues 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..169d1f64b84f892be957704cb91958af715e6cb7 100644
--- a/ui/webui/resources/js/cr/ui/alert_overlay.js
+++ b/ui/webui/resources/js/cr/ui/alert_overlay.js
@@ -5,13 +5,13 @@
cr.define('alertOverlay', function() {
/**
* The confirm <button>.
- * @type {HTMLButtonElement}
+ * @type {HTMLElement}
*/
var okButton;
/**
* The cancel <button>.
- * @type {HTMLButtonElement}
+ * @type {HTMLElement}
*/
var cancelButton;
@@ -46,13 +46,13 @@ 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()=} opt_okCallback A function to be called when the user
+ * presses the ok button. Can be undefined if |okTitle| is falsey.
+ * @param {function()=} opt_cancelCallback A function to be called when the user
* presses the cancel button. Can be undefined if |cancelTitle| is falsey.
*/
function setValues(
- title, message, okTitle, cancelTitle, okCallback, cancelCallback) {
+ title, message, okTitle, cancelTitle, opt_okCallback, opt_cancelCallback) {
if (typeof title != 'undefined')
$('alertOverlayTitle').textContent = title;
$('alertOverlayTitle').hidden = typeof title == 'undefined';
@@ -64,12 +64,12 @@ cr.define('alertOverlay', function() {
if (okTitle)
okButton.textContent = okTitle;
okButton.hidden = !okTitle;
- okButton.clickCallback = okCallback;
+ okButton.clickCallback = opt_okCallback;
if (cancelTitle)
cancelButton.textContent = cancelTitle;
cancelButton.hidden = !cancelTitle;
- cancelButton.clickCallback = cancelCallback;
+ cancelButton.clickCallback = opt_cancelCallback;
};
// Export

Powered by Google App Engine
This is Rietveld 408576698