function isFormInteresting_(form, numEditableElements, numFieldsRequired) {
  if (form.fields.length === 0) {
    return false;
  }

  // If the form has at least one field with an autocomplete attribute, it is a
  // candidate for autofill.
  for (var i = 0; i < form.fields.length; ++i) {
    if (form.fields[i]['autocomplete_attribute'] != null &&
        form.fields[i]['autocomplete_attribute'].length > 0) {
      return true;
    }
  }

  // If there are no autocomplete attributes, the form needs to have at least
  // the required number of editable fields for the prediction routines to be a
  // candidate for autofill.
  return numEditableElements >= numFieldsRequired;
}
/**
 * Determines whether the form is interesting enough to send to the browser for
 * further operations.
 *
 * Unlike the C++ version, this version takes a required field count param,
 * instead of using a hard coded value.
 *
 * It is based on the logic in
 *     bool IsFormInteresting(const FormData& form,
 *                            size_t num_editable_elements);
 * in chromium/src/components/autofill/content/renderer/form_cache.cc
 *
 * @param {AutofillFormData} form Form to examine.
 * @param {number} numEditableElements number of editable elements.
 * @param {number} numFieldsRequired number of fields required.
 * @return {boolean} Whether the form is sufficiently interesting.
 */
Determines whether the form is interesting enough to send to the browser for
further operations.

Unlike the C++ version, this version takes a required field count param,
instead of using a hard coded value.



@param {AutofillFormData} form Form to examine.
@param {number} numEditableElements number of editable elements.
@param {number} numFieldsRequired number of fields required.
@return {boolean} Whether the form is sufficiently interesting.
Determines whether the form is interesting enough to send to the browser for further operations . Unlike the C ++ version this version takes a required field count param instead of using a hard coded value . @param { AutofillFormData } form Form to examine . @param { number } numEditableElements number of editable elements . @param { number } numFieldsRequired number of fields required . @return { boolean } Whether the form is sufficiently interesting .
function isFormInteresting_(form, numEditableElements, numFieldsRequired) {
  if (form.fields.length === 0) {
    return false;
  }
  for (var i = 0; i < form.fields.length; ++i) {
    if (form.fields[i]['autocomplete_attribute'] != null &&
        form.fields[i]['autocomplete_attribute'].length > 0) {
      return true;
    }
  }
  return numEditableElements >= numFieldsRequired;
}
function isFormInteresting_ ( form , numEditableElements , numFieldsRequired ) { if ( form . fields . length === 0 ) { return false ; } for ( var i = 0 ; i < form . fields . length ; ++ i ) { if ( form . fields [ i ] [ 'autocomplete_attribute' ] != null && form . fields [ i ] [ 'autocomplete_attribute' ] . length > 0 ) { return true ; } } return numEditableElements >= numFieldsRequired ; }
Determines whether the form is interesting enough to send to the browser for
 further operations.
Determines whether the form is interesting enough to send to the browser for further operations .
// If the form has at least one field with an autocomplete attribute, it is a // candidate for autofill. // If there are no autocomplete attributes, the form needs to have at least // the required number of editable fields for the prediction routines to be a // candidate for autofill.