File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
packages/svelte/tests/runtime-runes/samples/svg-namespace-if-block Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ {#if true }
3+ <g >
4+ <rect x =" 20" y =" 10" width =" 50" height =" 50" fill =" yellow" />
5+ </g >
6+ {:else }
7+ <div >lol</div >
8+ {/if }
Original file line number Diff line number Diff line change 1+ import { test , ok } from '../../test' ;
2+
3+ export default test ( {
4+ html : `<svg height="200px" viewBox="0 0 100 100" width="200px"><g><rect fill="yellow" height="50" width="50" x="20" y="10"></rect></g></svg>` ,
5+ test ( { assert, target } ) {
6+ const g = target . querySelector ( 'g' ) ;
7+ const rect = target . querySelector ( 'rect' ) ;
8+ ok ( g ) ;
9+ ok ( rect ) ;
10+
11+ assert . equal ( g . namespaceURI , 'http://www.w3.org/2000/svg' ) ;
12+ assert . equal ( rect . namespaceURI , 'http://www.w3.org/2000/svg' ) ;
13+ }
14+ } ) ;
Original file line number Diff line number Diff line change 1+ <script >
2+ import Child from " ./Child.svelte" ;
3+ </script >
4+
5+ <svg viewBox =" 0 0 100 100" width =" 200px" height =" 200px" >
6+ <Child />
7+ </svg >
You can’t perform that action at this time.
0 commit comments