-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
feat: add idPrefix
to render
#15428
feat: add idPrefix
to render
#15428
Conversation
🦋 Changeset detectedLatest commit: 57b4d3a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This is awesome! @Rich-Harris, @paoloricciuti and @dummdidumm thanks for helping me with this and coming up with a solution quickly. I can now submit a PR to Astro to include it in their sveltejs integration so that islands will have unique ID's! |
Thank you @Hugos68! |
Alternative to #15403. Rather than adding
idPrefix
tomount
andhydrate
, it makes client-side ID generation global via thewindow.__svelte
object. This is more reliable than expecting people to deconflict in the rare cases that multiple Svelte runtimes exist on the page.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.packages/svelte/src
, add a changeset (npx changeset
).Tests and linting
pnpm test
and lint the project withpnpm lint