github/template-parts

SVG width={{width}} generates error to console

dy opened this issue · 1 comments

dy commented
const svgtpl = document.createElement('template')
svgtpl.innerHTML = '<svg width="{{w}}"></svg>'
let tpl = new TemplateInstance(svgtpl, {w:10})

This generates error in console:

Error: <svg> attribute width: Unexpected end of attribute. Expected length, "".

Some attributes need other than empty string default values.

It would be worth presenting these issues to the upstream proposal; as we intend to align closely to that and the current spec does not propose how these situations are handled.