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

Unified Diff: ios/web/web_state/js/resources/common.js

Issue 2454863002: Fix iOS autofill JavaScript compiler warnings. (Closed)
Patch Set: Created 4 years, 2 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 | « components/autofill/ios/browser/resources/autofill_controller.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/js/resources/common.js
diff --git a/ios/web/web_state/js/resources/common.js b/ios/web/web_state/js/resources/common.js
index 9e13a41d752d899ce5ef2bdec164a8809cb84587..b7449564bbd187037be9da1f205e3d146b466dd2 100644
--- a/ios/web/web_state/js/resources/common.js
+++ b/ios/web/web_state/js/resources/common.js
@@ -9,6 +9,9 @@ goog.provide('__crWeb.common');
goog.require('__crWeb.base');
+/** @typedef {HTMLInputElement|HTMLTextAreaElement|HTMLSelectElement} */
+var FormControlElement;
+
/**
* Namespace for this file. It depends on |__gCrWeb| having already been
* injected. String 'common' is used in |__gCrWeb['common']| as it needs to be
@@ -89,7 +92,7 @@ __gCrWeb['common'] = {};
*
* @param {Element} form A form element for which the control elements are
* returned.
- * @return {Array<Element>}
+ * @return {Array<FormControlElement>}
*/
__gCrWeb.common.getFormControlElements = function(form) {
if (!form) {
@@ -111,7 +114,7 @@ __gCrWeb['common'] = {};
var elements = form.elements;
for (var i = 0; i < elements.length; i++) {
if (__gCrWeb.common.isFormControlElement(elements[i])) {
- results.push(elements[i]);
+ results.push(/** @type {FormControlElement} */ (elements[i]));
}
}
return results;
« no previous file with comments | « components/autofill/ios/browser/resources/autofill_controller.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698