--- In svg-developers@yahoogroups.com, "CPK Smithies" <c.1@...> wrote:
>
> My response interposed below:
>
> -----Original Message-----
> From: svg-developers@yahoogroups.com
> [mailto:svg-developers@yahoogroups.com]On Behalf Of Domenico Strazzullo
> Sent: 04 July 2009 12:59
>
> > ... The script cannot work because it tries to remove children from
> obs while working with its length, which is live for
> getElementsByTagName. <
>
> The script did work, because if you look closely you will see that the
> array index is not incremented after the object elements in the
> DOMNodeList are removed. Another, perhaps tidier technique is to start
> at the end of the DOMNodeList and work backwards.
True, I missed it. 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.
>
> > ... for (var a in embedElements) { <
>
> Caution when doing this: if you're using jQuery or similar framework,
> you'll find functions added to the array prototype and the loop variable
> will pick them up too.
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...
>
> > Note also that you don't need to remove the children of ob for two
> reasons: a) they get removed when they get appended somewhere else, and
> b) they get removed anyway when removing the parent. So it's good to
> avoid those unnecessary complications :)<
>
> A useful point, thanks for that.
>
> > BTW, <object> "finally" seems to work with IE8. <
>
> The problem I reported earlier, of pages with larger numbers of SVG
> object elements, and a browser with no SVG plugin, randomly failing to
> load one or two of the contained .png images, has been observed with
> IE8. When this happens, the images also seem to load very slowly.
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.
Domenico
>
> I am working to provide Bradley Neuberg with a usable example - I just
> have to do a bit of anonymizing...
>
> Regards to all,
>
> Christopher S.
>