Closed rupertlssmith closed 6 years ago
Is it possible to make the example smaller? It seems like the core of it is about property "namespace"
, and the claim seems to be that it worked one way in 0.18 but another way in 0.19. Is it possible to take a look at the code and see why it may have worked in the past? I am surprised that it did.
I ran across an issue that led to the fix here: https://github.com/elm/svg/commit/62b46c83280fa0297a814747929c4fa96a86cfef
That demonstrates pretty clearly that things used to work with property
namespace. I guess some of the work I did to make virtual-dom smaller included switching to the nodeNS
way of setting this. (I recall it needed a special case when it was a property.) This probably happened quite early in the 0.19 process, so I am not 100% on the details. Enough that I thought it was always with nodeNS
!
Elm 0.91, Debian Stretch (or Ellie)
SSCCE:
When run, only one rounded rectangle is shown. This is because in the
roundRect
the DOM nodes are built withVirtualDom.node
. Even though the "namespace" property is set on them, they are not namespaced and their attributes are also lower-cased (which is the correct behaviour for the browser for non-namespaced nodes).The namespace can be set correctly using VirtualDom.nodeNS - which is what its for after all!
Should the
node
function accept namespaces set as a property, it did in 0.18?If this is not an oversight or genuine issue, I propose instead to submit a PR just adding a little note to the virtual-dom documentation to explain this.