mirror of https://github.com/sveltejs/svelte
handle foreignObject correctly, default to svg namespace for top-level svg elements - fixes #2298
parent
d637211e3e
commit
16106d113d
@ -0,0 +1,14 @@
|
|||||||
|
export default {
|
||||||
|
html: `
|
||||||
|
<svg>
|
||||||
|
<foreignObject x="0" y="0" width="100" height="100">
|
||||||
|
<p>some text</p>
|
||||||
|
</foreignObject>
|
||||||
|
</svg>
|
||||||
|
`,
|
||||||
|
|
||||||
|
test({ assert, target }) {
|
||||||
|
const p = target.querySelector('p');
|
||||||
|
assert.equal(p.namespaceURI, 'http://www.w3.org/1999/xhtml');
|
||||||
|
}
|
||||||
|
};
|
After Width: | Height: | Size: 104 B |
@ -1,8 +0,0 @@
|
|||||||
<script>
|
|
||||||
export let x;
|
|
||||||
export let y;
|
|
||||||
export let width;
|
|
||||||
export let height;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<rect x={x} y={y} width={width} height={height}/>
|
|
Loading…
Reference in new issue