| Index: ui/webui/resources/js/cr/ui/focus_row.js
|
| diff --git a/ui/webui/resources/js/cr/ui/focus_row.js b/ui/webui/resources/js/cr/ui/focus_row.js
|
| index 697cd699c538a60a4c45eff83cafe558fb452cd5..46c4d166ee3aa67dec6892de8d0e556470f2a6af 100644
|
| --- a/ui/webui/resources/js/cr/ui/focus_row.js
|
| +++ b/ui/webui/resources/js/cr/ui/focus_row.js
|
| @@ -29,6 +29,7 @@ cr.define('cr.ui', function() {
|
| * any focus change deactivates the row.
|
| *
|
| * @constructor
|
| + * @extends {HTMLDivElement}
|
| */
|
| function FocusRow() {}
|
|
|
| @@ -59,7 +60,8 @@ cr.define('cr.ui', function() {
|
| /**
|
| * Should be called in the constructor to decorate |this|.
|
| * @param {Node} boundary Focus events are ignored outside of this node.
|
| - * @param {FocusRow.Delegate=} opt_delegate A delegate to handle key events.
|
| + * @param {cr.ui.FocusRow.Delegate=} opt_delegate A delegate to handle key
|
| + * events.
|
| */
|
| decorate: function(boundary, opt_delegate) {
|
| /** @private {!Node} */
|
| @@ -90,7 +92,7 @@ cr.define('cr.ui', function() {
|
| * which previously held focus.
|
| * @return {!Element} The element that best matches sampleElement.
|
| */
|
| - getEquivalentElement: assertNotReached,
|
| + getEquivalentElement: function(sampleElement) { assertNotReached(); },
|
|
|
| /**
|
| * Add an element to this FocusRow. No-op if |element| is not provided.
|
| @@ -149,7 +151,7 @@ cr.define('cr.ui', function() {
|
| */
|
| onFocusin_: function(e) {
|
| if (this.boundary_.contains(assertInstanceof(e.target, Node)))
|
| - this.onFocusChange_(e.target);
|
| + this.onFocusChange_(/** @type {Element} */ (e.target));
|
| },
|
|
|
| /**
|
| @@ -158,7 +160,7 @@ cr.define('cr.ui', function() {
|
| * @private
|
| */
|
| onKeydown_: function(e) {
|
| - if (!this.contains(e.target))
|
| + if (!this.contains(/** @type {Node} */ (e.target)))
|
| return;
|
|
|
| if (this.delegate && this.delegate.onKeydown(this, e))
|
| @@ -194,7 +196,7 @@ cr.define('cr.ui', function() {
|
| // Only accept the left mouse click.
|
| if (!e.button) {
|
| // Focus this row if the target is one of the elements in this row.
|
| - this.onFocusChange_(e.target);
|
| + this.onFocusChange_(/** @type {Element} */ (e.target));
|
| }
|
| },
|
| };
|
|
|