Describe the bug
Something like this
<script lang="ts">
import {browser} from "$app/environment";
</script>
<div title={browser ? "client": "server"}>div</div>
should output
<div title="client">div</div>
after hydration (at least in legacy mode) but it doesn't because the attribute is inlined and the div is not marked as dynamic.
Reproduction
repl
- open the main page
- check the html
Logs
No response
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
svelte: ^5.2.3 => 5.2.3
Severity
annoyance