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.

Submitted by Jeff on Sun, 2006-05-28 01:02.

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

Submitted by Holger on Mon, 2006-05-29 08:19.

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
four plus equals twelve
Solve this math question and enter the solution with digits. E.g. for "two plus four = ?" enter "6".