-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Svelte 5: Rename rendered.html
to rendered.body
#11281
Comments
There's been a very long-standing issue about people wanting to be able to attach (primarily) classes to the |
Good question. I think it'd be fine to do it in a minor — even though you can technically do Perhaps an API like this, with declare function render(component, opts): {
head: string;
body: string;
attributes: {
root: Record<string, string>;
body: Record<string, string>:
}
} |
For the breaking change, what I meant was that, if someone were calling the If we wanted to, we could address the breaking change you're discussing by making things like |
I suppose the alternative solution is to just go ahead and implement |
Shouldn't it be |
This would be quite invasive to do in the RC, I wonder if we should just push it back to Svelte 6? |
What about just marking the property as |
Describe the problem
very minor annoyance, but it always irks me a bit that the
render(...)
return value hashead
andhtml
properties rather thanhead
andbody
Describe the proposed solution
Return a
{ head, html, body }
object wherehtml
andbody
are identical, buthtml
is marked as deprecated in the types. Eventually, have an explicit warning whenresult.html
is accessed, and remove it in Svelte 6 (by which time tooling like SvelteKit will have updated).Importance
nice to have
The text was updated successfully, but these errors were encountered: