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

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: rebase once again 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
« no previous file with comments | « ui/webui/resources/js/cr.js ('k') | ui/webui/resources/js/cr/ui/command.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7a54d4395e856c6d94a7514b7ef71760d9274113 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,14 @@ 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
- * presses the cancel button. Can be undefined if |cancelTitle| is falsey.
+ * @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) {
+ function setValues(title, message, okTitle, cancelTitle, opt_okCallback,
+ opt_cancelCallback) {
if (typeof title != 'undefined')
$('alertOverlayTitle').textContent = title;
$('alertOverlayTitle').hidden = typeof title == 'undefined';
@@ -64,12 +65,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
« no previous file with comments | « ui/webui/resources/js/cr.js ('k') | ui/webui/resources/js/cr/ui/command.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698