Index: chrome/browser/resources/print_preview/search/destination_list_item.js |
diff --git a/chrome/browser/resources/print_preview/search/destination_list_item.js b/chrome/browser/resources/print_preview/search/destination_list_item.js |
index 58ded04a498b856881afd9fdd189b3a7594ebab7..9a9fe58de41b4791bda1f2e5e281a83809c69074 100644 |
--- a/chrome/browser/resources/print_preview/search/destination_list_item.js |
+++ b/chrome/browser/resources/print_preview/search/destination_list_item.js |
@@ -38,7 +38,7 @@ cr.define('print_preview', function() { |
* @private |
*/ |
this.query_ = query; |
- }; |
+ } |
/** |
* Event types dispatched by the destination list item. |
@@ -75,7 +75,7 @@ cr.define('print_preview', function() { |
this.onRegisterPromoClicked_.bind(this)); |
}, |
- /** @return {!print_preiew.Destination} */ |
+ /** @return {!print_preview.Destination} */ |
get destination() { |
return this.destination_; |
}, |
@@ -241,7 +241,7 @@ cr.define('print_preview', function() { |
/** |
* Shows/Hides the configuring in progress message and starts/stops its |
* animation accordingly. |
- * @param {bool} show If the message and animation should be shown. |
+ * @param {boolean} show If the message and animation should be shown. |
* @private |
*/ |
updateConfiguringMessage_: function(show) { |
@@ -287,7 +287,7 @@ cr.define('print_preview', function() { |
/** |
* Called when the key is pressed on the destination item. Dispatches a |
* SELECT event when Enter is pressed. |
- * @param {KeyboardEvent} e Keyboard event to process. |
+ * @param {!KeyboardEvent} e Keyboard event to process. |
* @private |
*/ |
onKeyDown_: function(e) { |
@@ -319,7 +319,7 @@ cr.define('print_preview', function() { |
* Handles click and 'Enter' key down events for the extension icon element. |
* It opens extensions page with the extension associated with the |
* destination highlighted. |
- * @param {MouseEvent|KeyboardEvent} e The event to handle. |
+ * @param {Event} e The event to handle. |
* @private |
*/ |
onExtensionIconClicked_: function(e) { |
@@ -330,15 +330,15 @@ cr.define('print_preview', function() { |
/** |
* Handles key down event for the extensin icon element. Keys different than |
* 'Enter' are ignored. |
- * @param {KeyboardEvent} e The event to handle. |
+ * @param {Event} e The event to handle. |
* @private |
*/ |
onExtensionIconKeyDown_: function(e) { |
- if (hasKeyModifiers(e)) |
+ if (e && hasKeyModifiers(e)) |
Dan Beam
2017/05/10 00:00:14
same nit regarding !Event vs e && (just to type fi
rbpotter
2017/05/10 01:56:23
Does not work here as this gets assigned to extens
dpapad
2017/05/10 02:54:12
Nit(optional): It seems that onkeydown,onclick are
dpapad
2017/05/10 02:59:20
Actually you should probably not follow my previou
Dan Beam
2017/05/10 03:18:35
this works for me
http://closure-compiler.appspot
rbpotter
2017/05/10 03:42:10
Done. Should I change it to !KeyboardEvent if we a
|
return; |
if (e.keyCode != 13 /* Enter */) |
return; |
- this.onExtensionIconClicked_(event); |
+ this.onExtensionIconClicked_(e); |
} |
}; |