Chromium Code Reviews| 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..e11ece5d082072bec7e7ed9aa280395f02dfdfc3 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) { |
| @@ -291,7 +291,7 @@ cr.define('print_preview', function() { |
| * @private |
| */ |
| onKeyDown_: function(e) { |
| - if (!hasKeyModifiers(e)) { |
| + if (e && !hasKeyModifiers(e)) { |
| if (e.keyCode == 13) { |
| var activeElementTag = document.activeElement ? |
| document.activeElement.tagName.toUpperCase() : ''; |
| @@ -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. |
|
dpapad
2017/05/08 20:40:10
!Event
rbpotter
2017/05/08 23:28:20
This function has to have @param {Event} as the in
|
| * @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)) |
|
dpapad
2017/05/08 20:40:10
Can |e| be ever null? If not let's change the anno
rbpotter
2017/05/08 23:28:20
Same as above for this function - assigned to onke
|
| return; |
| if (e.keyCode != 13 /* Enter */) |
| return; |
| - this.onExtensionIconClicked_(event); |
| + this.onExtensionIconClicked_(e); |
| } |
| }; |