mirror of https://github.com/sveltejs/svelte
replace all invalid characters in attribute names when creating variables (fixes #470)
parent
c54bebb750
commit
a47a679e38
@ -0,0 +1,14 @@
|
|||||||
|
export default {
|
||||||
|
data: { foo: 'bar' },
|
||||||
|
|
||||||
|
html: `
|
||||||
|
<svg>
|
||||||
|
<use xlink:href="#bar"/>
|
||||||
|
</svg>
|
||||||
|
`,
|
||||||
|
|
||||||
|
test ( assert, component, target ) {
|
||||||
|
const use = target.querySelector( 'use' );
|
||||||
|
assert.equal( use.getAttributeNS( 'http://www.w3.org/1999/xlink', 'href' ), '#bar' );
|
||||||
|
}
|
||||||
|
};
|
After Width: | Height: | Size: 42 B |
Loading…
Reference in new issue