> The script shouldn't work anyway because you can't append fallback
content elements to <embed>. HTML 5 doesn't allow that either, if I read
well. <
Let us agree that the script would not work (or even exist) in an ideal
world. However, in the actual world, we are working with browsers which
violate all sorts of important metaphysical principles (e.g. that
"ought" implies "can"). From the practical point of view, then, and
without passing any value judgments, it does appear that IE executes (or
not) its fallback logic on the object elements. If the decision is to
fall back, then it seems the object elements are ignored; otherwise, the
child elements (except param elements) are eliminated. So when the
script runs and the object elements are converted to embeds, all is in
fact well, except for the erratic loading of the object/fallback data.
> Jquery, Ext.js and others all add methods to the Array prototype, but
I'd be surprised if they added elements to arrays. If using jQuery one
cannot loop through array elements using 'for in' then that's really
scary! Maybe you mean objects, as class instances, where you get all
(almost) the enumerable properties... <
Well, I hereby surprise you. They do. And yes, the ability of javascript
frameworks to break the expected behaviour of native types IS scary.
> I just tried 8 <object> tags with SVGs (+ scripts and SMIL) and IE8
runs all of them fine for like 5 secs and then crashes. With no plugin
it loads the fallback png's fast. <
That's interesting. Try the example on my site, with 21 SVG objects:
http://smithies.org/cpks/test/
What was your score? I'll bet it wasn't 21! (This example does not use
the script at all. The sole purpose of the script was to get IE to
render the SVG backgrounds transparent.)
Regards,
Christopher S.