mirror of https://github.com/sveltejs/svelte
				
				
				
			Merge pull request #2319 from sveltejs/gh-2298
	
		
	
				
					
				
			handle foreignObject correctly, default to svg namespace for top-level svg elementspull/2326/head
						commit
						33bf4a40db
					
				@ -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