getComputedStyle weirdness in Safari

getComputedStyle weirdness in Safari


Hey guys,
as you might know, Safari supports getComputedStyle since version 3.
However, recently, somebody informed me that our class morphing
doesn't work in Safari (in jQuery UI), so I investigated.
What I found out, is that the object returned by getComputedStyle
doesn't /seem/ to be a actual object. Check this out:
var foo = document.defaultView.getCurrentStyle(elem, null);
alert(foo.color); //returns something like rgb(0,0,0)
var bar = $.extend({}, document.defaultView.getCurrentStyle(elem,
null));
alert(bar.color); //returns undefined
as you can see, the only thing changed is that I extend a empty object
with the current style. However, all property names are lost, and the
only thing left are numeric indexes.
Any idea, or should I give this to the Webkit team directly?