Open
Description
Description
<svg>
s with the xmlns:xlink
attribute cause a runtime error that only occurs with dynamic VNodes (not static ones).
Steps to Reproduce
<template>
<svg
data-dynamic={foo}
xmlns:xlink="http://www.w3.org/1999/xlink"
></svg>
</template>
Result
Uncaught DOMException: Failed to execute 'setAttributeNS' on 'Element': 'http://www.w3.org/1999/xlink' is an invalid namespace for attributes.
The error is thrown from LWC here:
...called from here:
lwc/packages/@lwc/engine-core/src/framework/modules/attrs.ts
Lines 55 to 57 in 8111f1f
If you remove data-dynamic={foo}
above, it will render correctly.
Activity