wondering about the design rationale for serializeArray

wondering about the design rationale for serializeArray

The serializeArray function seems to make the assumption that this is either an existing form or element array. This also excludes serialization of partials without the end user doing extra work when using serialize which seems like a common use case with ajax applications. 

I'm wondering why this decision was made versus in the case where this is neither a form nor an array the core would extract the form input, select, :checked, etc. elements from the subtree of this

  1. serializeArray: function() {
  2. return this.map(function() {
  3. return this.elements ? jQuery.makeArray(this.elements) : this;
  4. })
  5. .filter(function() {
  6. return this.name && !this.disabled &&
  7. (this.checked || rselectTextarea.test(this.nodeName) ||
  8. rinput.test(this.type));
  9. })