assume the custom element
          // has a validate() method, otherwise we can't check it.
          var validatable = /** @type {{validate: (function() : boolean)}} */ (el);
          if (validatable.validate) {
            valid = !!validatable.validate() && valid;
          }
        }
        return valid;
      },

      /**
       * Submits the form.
       */
      submit: function(event) {
        // We are not using this form for submission, so always cancel its event.
        if (event) {
      