When I run the following test file in ASVG3 and Squiggle, the 'click here' text is blue. When I run it in Moz/SVG the 'click here' text is red and there is an error in the JavaScript console indicating getBBox() is generating an exception.
I know that getBBox() works in all 3 environments, because if you click on the text the bbox is read and the returned x value is displayed. Which is functioning correctly, ASVG3 and Squiggle or Moz/SVG? Is there a better solution than a timer hack to be able to use the results of getBBox() during initialization in all three environments? I think that I've read about a problem like this, but can't find that discussion. ---------------- <?xml version='1.0'?> <svg xmlns='http://www.w3.org/2000/svg' width="500" height="400" onload="init(evt)"> <defs> <script> <![CDATA[ function init(evt) { var svgDoc = evt.target.ownerDocument; var element = svgDoc.getElementById('t1'); element.setAttribute('fill', 'red'); var bbox = element.getBBox(); element.setAttribute('fill', 'blue'); } function onClick(evt) { var element = evt.target; bbox = element.getBBox(); element.firstChild.nodeValue = "bbox.x = " + bbox.x; } ]]> </script> </defs> <g onclick="onClick(evt)" fill="green" font-size="18"> <text id="t1" x="20" y="100">click here</text> </g> </svg> ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/