dont use property names with SVG elements

pull/38/head
Rich Harris 8 years ago
parent aab6df51fd
commit 621fc92b1c

@ -5,7 +5,7 @@ import deindent from '../../utils/deindent.js';
export default function addElementAttributes ( generator, node, local ) {
node.attributes.forEach( attribute => {
if ( attribute.type === 'Attribute' ) {
let metadata = attributeLookup[ attribute.name ];
let metadata = generator.current.namespace ? null : attributeLookup[ attribute.name ];
if ( metadata && metadata.appliesTo && !~metadata.appliesTo.indexOf( node.name ) ) metadata = null;
let dynamic = false;

@ -0,0 +1,18 @@
// Hmm, another JSDOM quirk
export default {
skip: true,
html: `
<svg>
<g>
<circle class='red'/>
</g>
</svg>
`,
test ( assert, component, target ) {
const circle = target.querySelector( 'circle' );
assert.equal( circle.getAttribute( 'class' ), 'red' );
component.teardown();
}
};

@ -0,0 +1,5 @@
<svg>
<g>
<circle class='red'/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 48 B

Loading…
Cancel
Save