You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an SVG Icon component which is itself just m('svg.Icon', vnode.attrs, vnode.children). When attrs contains a className (in order to add a dynamic className besides Icon) an error is thrown, but not initially. It works fine until onupdate.
Seems like it could be a simple fix: adobe-webplatform/Snap.svg#414
If the comments there are true, it's just a matter of using setAttribute or className.baseVal when the element is an svg.
Steps to Reproduce:
constIcon={view(vnode){returnm('svg.Icon',vnode.attrs,vnode.children);}};constFooIcon={view(vnode){returnm(Icon,{className: 'foo'},m('path',{d: ''}));// empty path for simple demo}};
Expected:
SVG element should have className of Icon foo
Actual:
Uncaught TypeError: Cannot set property className of #<SVGElement> which has only a getter
Description:
I have an SVG
Icon
component which is itself justm('svg.Icon', vnode.attrs, vnode.children)
. Whenattrs
contains a className (in order to add a dynamic className besidesIcon
) an error is thrown, but not initially. It works fine untilonupdate
.Seems like it could be a simple fix:
adobe-webplatform/Snap.svg#414
If the comments there are true, it's just a matter of using
setAttribute
orclassName.baseVal
when the element is an svg.Steps to Reproduce:
Expected:
SVG element should have className of
Icon foo
Actual:
Uncaught TypeError: Cannot set property className of #<SVGElement> which has only a getter
https://github.com/lhorie/mithril.js/blob/rewrite/mithril.js#L532
The text was updated successfully, but these errors were encountered: