On Feb 19, 8:50 pm, "Bob Ippolito" <[EMAIL PROTECTED]> wrote:
> On 2/19/07, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:

> > I have then two questions:
> >    1. Was my expectation that the little script above should work
> > unfounded ?  If so, why ?
>
> If it did work, then it would probably move all of the child nodes
> from one div to the other.

Yes that's what I want it to do.  Gecko does it, I think IE does it (I
don't have regular access).  But not Safari.

> >    2. Is there a better way to go around this problem ?  Maybe the
> > coerceToDOM function should check for the existence of node.apply
> > before using it ?
>
> Safari will crash if you try and do that unfortunately. That might be
> able to be special cased by checking to see if they're an instance of
> something.

Unfortunately I still feel at odds with javascript and I suspect I
write a lot of nasty looking code (even though mochikit has helped me
quite a bit) so I don't feel up to making it work.

> It look like you might just want to do mydiv.cloneNode(true).

Well my example was not quite what I want to do so I'm not sure it's
this simple :)
For now I think I'll just keep coercing [node].childNodes into an
array before passing it on to anything that uses coerceToDOM.

Thanks.

--
Arnaud


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to