Skip to content

refactor: load turnstile script manually#23

Merged
ghostdevv merged 1 commit intoghostdevv:mainfrom
gitcontext:main
Jul 2, 2024
Merged

refactor: load turnstile script manually#23
ghostdevv merged 1 commit intoghostdevv:mainfrom
gitcontext:main

Conversation

@mstachowiak
Copy link
Contributor

@mstachowiak mstachowiak commented Feb 2, 2024

Fixes: #22

Modifying script loading to accommodate the upcoming release of Svelte 5. The on:load event for scripts placed inside <svelte:head> does not fire in Svelte 5 as a result of this bug:
sveltejs/svelte#8301

Instead of loading the Cloudfare Turnstile script in <svelte:head>, load the script dynamically during mount. This is functionally equivalent to using <svelte:head> but accommodates an operational load event handler. If Svelte 5 resolves Issue 8301, this is not needed.


This pull request can be reviewed on GitContext.com

Modifying script loading to accommodate the upcoming release of Svelte 5.
The `on:load` event for scripts placed inside `<svelte:head>` does not
fire in Svelte 5 as a result of this bug:
sveltejs/svelte#8301

Instead of loading the Cloudfare Turnstile script in `<svelte:head>`, load
the script dynamically during mount. This is functionally equivalent to
using `<svelte:head>` but accommodates an operational load event handler.
If Svelte 5 resolves Issue 8301, this is not needed.
@timootten
Copy link

Please merge this, thanks :)

@ghostdevv ghostdevv changed the title Add Svelte 5 Support refactor: load turnstile script manually Jul 2, 2024
@ghostdevv ghostdevv merged commit f92789b into ghostdevv:main Jul 2, 2024
@ghostdevv
Copy link
Owner

Thanks! Sorry for the delay 😅

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Svelte 5 support

3 participants