mirror of https://github.com/sveltejs/svelte
parent
83cec2f3d1
commit
ef640c3b46
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: render attributes during SSR regardless of case
|
@ -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');
|
||||
}
|
||||
});
|
@ -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>
|
Loading…
Reference in new issue