Skip to content

An JavaScript event fired at the beginning and the end of verification to hold the user waiting #60

Description

@cqjjjzr

Hello. I noticed the discussion at https://github.com/WICG/email-verification#have-you-looked-at-declarative-apis why Declarative HTML API wasn't the shape we took.

However, after testing the demos available at https://rowan.fyi/made/email-verification/ and reading the blog post from Google (https://developer.chrome.com/blog/email-verification-august-2026#progress_indicator), I noticed that if there is only one single E-Mail entry box in the form, possibilities are high that the user autocomplete or type the E-Mail and just 1) hit enter fast 2) use mouse to click the submit button before the verification happen.

To effectively promote the usage of EVP, I tend to believe that if the browser found EVP available, aside from popping up the dialog (it actually takes ~2s to pop up on my side), we should be able to hold the user from submitting the form prematurely.

An example:

<script>
form.addEventListener(`emailVerificationStarted`, () => {
    submitButton.setAttribute(`disabled`, `true`);
});

form.addEventListener(`emailVerificationFinished`, () => {
    submitButton.setAttribute(`disabled`, `false`);
});
</script>

Another possible solution is let the browser decide everything: if the email verification protocol is available, then the browser hold the form submission until it either obtains a token or fails.

Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions