in IE9, when a SVG is embedded using (object) tags, any ECMAScript embedded inside the SVG cannot access the parent / top HTML document. this works for any other browser, though.
developing using linux only i never realized that until today. the problem is, all our SVGs contain a onload method to signal to the parent HTML document that the SVG DOM is ready. unfortunately, there is no other way to determine whether the SVG’s DOM is ready except for polling which i consider highly inelegant.
so … is there any known workaround for this? that is, access the parent HTML document from within a SVG in IE9?
or any other cross-browser / cross plattform method to determine whether a SVG is completely loaded which does NOT involve polling and timeouts but callbacks?
i’d rather not use a fully blown framework for this like the jQuery SVG plugin.
in IE9, when a SVG is embedded using (object) tags, any ECMAScript embedded inside
Share
ok. after a sleepless night i finally figured it out. without any instructions IE9 seems to render pages in Quirks mode. when in Quirks mode SVGs are obviously sandboxed and any ECMAScript inside the SVG cannot access the parent document.
whenever IE9 is forced to actually render a page using IE9 standards everything works like a charm.
use
to force IE9 standard mode