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( |