instrumentl / rails-cloudflare-turnstile

ISC License
25 stars 14 forks source link

feat: allow configuring async and defer options of turnstile scripts #22

Closed eyupatis closed 1 year ago

eyupatis commented 1 year ago

According to the official documentation, it is suggested to use defer combined with async. In this PR, we are introducing the suggested behavior.

Screenshot 2023-02-03 at 14 30 29
Roguelazer commented 1 year ago

Last time I did this, you said it was bad: https://github.com/instrumentl/rails-cloudflare-turnstile/pull/1#discussion_r1064369474

was that reference wrong?

eyupatis commented 1 year ago

I didn't know that async takes precedence over defer and I just learned that from https://stackoverflow.com/a/55389033/1554894. Knowing that I want to change this helper method to take arguments and make them configurable.