Does DOMContentLoaded work for SVG elements in IE9?

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.

preguntado el 24 de agosto de 12 a las 00:08

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. -

Que quieres decir con "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? -

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!! -

Why not hook into the onload event rather than DOMContentLoaded? -

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." -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.