Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sveltekit:start event #6448

Closed
Rich-Harris opened this issue Aug 30, 2022 · 3 comments
Closed

Remove sveltekit:start event #6448

Rich-Harris opened this issue Aug 30, 2022 · 3 comments

Comments

@Rich-Harris
Copy link
Member

Describe the problem

The only real reason we have this is so that we can do some setup work in our test suite. It's a bit of a weird appendage — you can't really use it to do useful setup work, and it would probably be better to just use root layouts, even if it would add a tiny bit of repeated code to our tests.

Describe the proposed solution

Remove the event

Alternatives considered

Leave the event

Importance

nice to have

Additional Information

No response

@Rich-Harris Rich-Harris added this to the 1.0 milestone Aug 30, 2022
illuzan added a commit to illuzan-forks/kit that referenced this issue Aug 31, 2022
@illuzan
Copy link
Contributor

illuzan commented Aug 31, 2022

I have created a PR for this #6467

@dummdidumm
Copy link
Member

It may be that others rely on this to know "ok SvelteKit is setup", maybe KitQL (cc @jycouet), in general all people who came across #4447

@Conduitry
Copy link
Member

I actually didn't know about this event. What I ended up doing in an app (something going back to when it was using Sapper) in e2e tests when I wanted to make sure the app was running and hydrated before proceeding was to have onMount(() => document.body.setAttribute('hydrated', '')) in my root layout and then just wait for that attribute to be present in the tests. That's working fine enough for me, and it's presumably less susceptible to race conditions if you happen to be too later in attaching your event listener.

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

Successfully merging a pull request may close this issue.

4 participants