javascript - IE 9 stops working when using getIntersectionList function -


i have svg code:

<svg id="svgsurface" width="500" height="500">     <defs>         <marker id="triangle" viewbox="0 0 20 20" refx="0" refy="0" markerunits="strokewidth" markerwidth="8" markerheight="6" orient="auto">             <path d="m 0 0 l 20 10 l 0 20 z" fill="red" fill-opacity="1">             </path>         </marker>     </defs>     <line x1="10" y1="10" x2="100" y2="100" class="line" marker-end="url(#triangle)"></line> </svg> 

and javascript code:

var svg = document.getelementbyid("svgsurface");  var svgrect = svg.createsvgrect(); svgrect.x = 0; svgrect.y = 0; svgrect.width = 50; svgrect.height = 50;  var nodes = svg.getintersectionlist(svgrect, null);  alert(nodes.length); 

here working example in fiddle http://jsfiddle.net/gyaex/1/

as can see try nodes rendered content intersects specified rectangle svgrect. in chrome works in ie crashes , don't understand why.

if crashes that's bug in ie should report microsoft, having said using incorrectly should passing in element , not null last argument. in case want this:

var nodes = svg.getintersectionlist(svgrect, svg); 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -