That title about sums it up. I think attaching to the DOMContentLoaded or maybe it's works right in HTML5 in IE9. But I'm not having much luck connecting with an event that is available for the completion of a bunch of SVG markup into the DOM. Are there any pointers about this? I would prefer to use a "pure SVG" document, not HTML5. But I am sort of roped into HTML5 because it's helpful to have the meta tag in the head that switches the browser into an IE9 SVG supportive rendering mode. Please, send help on the question of SVG in IE9 hooking up to Javascript!! Thanks everyone.
-
Afaik, "DOMContentLoaded" is triggered in the moment the (HTML) source code has been fully parsed (into the DOM). At that moment the page has potentially not yet been fully rendered.– Šime VidasAug 23, 2012 at 23:49
-
What do you mean by "for the completion of a bunch of SVG markup into the DOM"? Have you tried accessing the SVG node in the DOM? It's not there?– Šime VidasAug 23, 2012 at 23:51
-
I have html containing one SVG, and within that a structure of other SVGs. The child SVGs rely on being able to query each other, but IE9 loads the SVGs asynchronously, so there's no guarantee one child SVG can access another. If DOMContentLoaded on the parent SVG "worked" then one could assume all its children were loaded as well. However since DOMContentLoaded only seems to work right on the HTML, this important capability is unavailable. Instead I am forced into a bunch of hokey workarounds that are inelegant to say the least. If only IE9 loaded the DOM in document order!!– DaveAug 24, 2012 at 5:26
-
Why not hook into the onload event rather than DOMContentLoaded?– Robert LongsonAug 24, 2012 at 7:11
-
Tried that Robert. The problem is the onloads don't seem to cascade right, the underlying "child" SVGs seem to load asynchronously and disconnectedly from the parent. Getting an onload from the parent is no guarantee the children are all "onloaded."– DaveAug 24, 2012 at 18:14
Add a comment
|