-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: render attributes during SSR regardless of case (#14492)
fixes part of #14479
- Loading branch information
1 parent
83cec2f
commit ef640c3
Showing
4 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
fix: render attributes during SSR regardless of case |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
packages/svelte/tests/runtime-runes/samples/dynamic-element-svg/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { test } from '../../test'; | ||
|
||
export default test({ | ||
mode: ['hydrate'], | ||
|
||
test({ assert, target, hydrate }) { | ||
const svg = target.querySelector('svg'); | ||
const circle = target.querySelector('circle'); | ||
|
||
assert.equal(svg?.getAttribute('viewBox'), '0 0 1000 1000'); | ||
assert.equal(svg?.namespaceURI, 'http://www.w3.org/2000/svg'); | ||
assert.equal(circle?.namespaceURI, 'http://www.w3.org/2000/svg'); | ||
|
||
hydrate(); | ||
|
||
assert.equal(svg?.getAttribute('viewBox'), '0 0 1000 1000'); | ||
assert.equal(svg?.namespaceURI, 'http://www.w3.org/2000/svg'); | ||
assert.equal(circle?.namespaceURI, 'http://www.w3.org/2000/svg'); | ||
} | ||
}); |
11 changes: 11 additions & 0 deletions
11
packages/svelte/tests/runtime-runes/samples/dynamic-element-svg/main.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script> | ||
let props = { | ||
height: '100px', | ||
width: '100px', | ||
viewBox: '0 0 1000 1000' | ||
}; | ||
</script> | ||
|
||
<svelte:element this={'svg'} {...props}> | ||
<circle cx="500" cy="500" r="500"></circle> | ||
</svelte:element> |