javascript - Can't find flowed text element by ID in SVG -
I am playing with an animation in SVG: (link for script "anim.js")
In the window. In the load event, I have:
function init (evt) {if (window.svgDocument == null) {if (evt.target & evt.target .ownerDocument) svgDocument = Evt.target.ownerDocument; Else if (evt.originalTarget & amp; ampt.originalTarget.ownerDocument) svgDocument = evt.originalTarget.ownerDocument; Other svgDocument = documents; } _debug = svgDocument.getElementById ('debug'); Warning (_debug.firstChild.nodeValue); (I = 0; i & lt; 1; i ++) for balls (i) = svgDocument.getElementById ('ball' + i); Set interval (loop, 50); }
This 'ball' object can be found properly, but not 'debug' object (elementbid empty return). I can see it in the source, so why can not I get the script?
Most are testing in the implementation of SVG 1.1 because the flow route was introduced in SVG 1.2 . Invalid elements have been ignored, so DOM
Comments
Post a Comment