You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2005/03/16 09:49:45 UTC

DO NOT REPLY [Bug 34030] New: - appendChild method hangs when insterting a new element with child in ecmascript

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34030>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34030

           Summary: appendChild method hangs when insterting a new element
                    with child in ecmascript
           Product: Batik
           Version: 1.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SVG Viewer
        AssignedTo: batik-dev@xml.apache.org
        ReportedBy: nlv11370@natlab.research.philips.com


When I view the following code in the batik squiggle viewer and click the
rectangle the viewer hangs and consumes a lot of processing power.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg id="svgdoc" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<script type="text/ecmascript">
<![CDATA[
function testFunction()
{
	var testObj = document.getElementById("test");
	var newElem = document.createElement("text");
	newElem.appendChild(document.createTextNode("tester"));
	testObj.appendChild(testObj);
}
]]>
</script>
<rect x="30" y="30" width="40" height="40" onclick="testFunction()" />
<g id="test">
	<text x="10" y="10" id="test3">test2</text>
</g>
</svg>

The method where the browser hangs on is appendChild. I suspect that it has
something to do with the org.apache.batik.css.engine because somethimes I get
the following message at my java console (when I keep the DOM viewer open).

at org.apache.batik.css.engine.CSSEngine.getComputedStyle(Unknown Source

Hope someone can help me with this problem.

Greetings,
Gertjan

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org