opera9 does not return the original domstring on getAttribute
Submitted by Holger on Sat, 2006-05-27 16:57.
i'm not sure its a bug, but its at least anoying:
when you call elem.getAttributeNS(null,"fill")
Opera9 allways returns colors in the form #xxyyzz
no matter how the color is specified e.g. (fill="red" --> #ff0000)
i dont know if other attributes/types(other than colors) are effected ,too.
Hi Holger,
That's a good question about whether it's a bug. I don't have the energy tonight to go through it, but I'm thinking this might even be something in the DOM spec (not the SVG spec).
This annoyance tends to force you to work in long hex form for all your colours, but otherwise does it pose any other difficulties?
Jeff
Hi Jeff
thanks for your reply,
well with the colors i only see minor problems i.e.:
imagine some rects using SVG colorkeywords as fill ( something like a colorpicker ). if you need to return these colorkeywords you have a problem.
more importantly this is not only effecting colors, but all types of attributes.
for example the d attribute of a path :
d="M0,0L512 768L1024 0z" -original value ( returned in ASV )
d="M0,0 L512,768 L1024,0 z" - reformating in firefox
d="M 0 0 L 512 768L 1024 0Z" - reformating in opera
i just rememberd that i've filed a mozilla bug on this issue before
bug 302011
what i get from the comments there is that the domstring should be returned,
but the problem is if you use the dom interfaces to change a pathSegment,
what would be the "correct" syntax to be returned afterwards ?
i think that Jonathans proposal seems to be the most reasonable solution.
Holger
Post new comment