[Prototype-core] XML nodes and Element.readAttribute (IE bug)

2007-09-13 Thread Yanick
I don't know if anyone has encountered this problem before, but I was reading nodes from an XML document (ajax response) and I tried the Element.readAttribute function instead of my own home brewed algorithm. (This Web application goes all the way from before there was such function in the Prototy

[Prototype-core] Re: consistency $() vs Element.extend()....

2007-09-13 Thread jdalton
Mislav, I am just giving you a hard time :P I also noticed there is inconsistent use of single quote vs double quote... seems more single thant double (I prefer single quites unless a newline character is involved... I will fix that as well if you like. --~--~-~--~~~

[Prototype-core] Re: Element.update() speed boost

2007-09-13 Thread Mislav Marohnić
On 9/13/07, Ryan Gahl <[EMAIL PROTECTED]> wrote: > > You'd be losing attached event observers anyway when you do a plain old > .innerHTML = "..." He meant the target element, not the subelements. Yeah, it will remove event handlers. Prototype, however, is able to remove all attached handlers auto

[Prototype-core] Re: Element.update() speed boost

2007-09-13 Thread Jeff Watkins
Take a look at Steve Brewer's enhancement: You don't lose the original node. On Sep 13, 2007, at 9:50 AM, Tom Gregory wrote: > Is there a "gotcha" with this code? (I haven't tested, and defer to > brighter minds

[Prototype-core] Re: Element.update() speed boost

2007-09-13 Thread Ryan Gahl
You'd be losing attached event observers anyway when you do a plain old .innerHTML = "..." If anything, a one-step further implementation of this method would handle _removing_ any event handlers for you for memory management considerations (addressing potential circular reference based leaks that

[Prototype-core] Re: Element.update() speed boost

2007-09-13 Thread Tom Gregory
Is there a "gotcha" with this code? (I haven't tested, and defer to brighter minds than mine.) Because he's replacing the "target" node with a clone of itself (code below), is there the potential to lose attached event observers? That'd violate POLS. /* This is much faster than using (el.

[Prototype-core] Re: consistency $() vs Element.extend()....

2007-09-13 Thread Mislav Marohnić
On 9/13/07, jdalton <[EMAIL PROTECTED]> wrote: > > > You should know by now, I published the packed versions of Prototype Of course I know. But I was speaking to anyone else who might be reading our conversation. --~--~-~--~~~---~--~~ You received this message bec

[Prototype-core] Re: consistency $() vs Element.extend()....

2007-09-13 Thread jdalton
Come on Mislav :D, You should know by now, I published the packed versions of Prototype, encouraging people to use the gzipped forms included in the package... I my projects the Prado PHP framework takes care of the gzipping, versioning, and packaging :P --~--~-~--~~~--

[Prototype-core] Re: consistency $() vs Element.extend()....

2007-09-13 Thread Mislav Marohnić
On 9/13/07, jdalton <[EMAIL PROTECTED]> wrote: > > > I have noticed there are alot of places in the Prototype 1.6 where > you use Element.extend() vs $(). Is there a performance reason for > this, becuase it does add to script size.. I approve of replacing $ with extend where this makes sense. It

[Prototype-core] consistency $() vs Element.extend()....

2007-09-13 Thread jdalton
I have noticed there are alot of places in the Prototype 1.6 where you use Element.extend() vs $(). Is there a performance reason for this, becuase it does add to script size.. I will happily make a patch if a course of action is decided on either way. --~--~-~--~~~-

[Prototype-core] Re: Element.update() speed boost

2007-09-13 Thread Ryan Gahl
um, oops: "duh, how _come_ ..." (missed a word) On 9/13/07, Ryan Gahl <[EMAIL PROTECTED]> wrote: > > +1 for baking this into core, it's like "duh, how no one tested this > before" > > On 9/13/07, jdalton < [EMAIL PROTECTED]> wrote: > > > > > > Hi all, > > > > I was just reading on ajaxian that Ste

[Prototype-core] Re: Element.update() speed boost

2007-09-13 Thread Ryan Gahl
+1 for baking this into core, it's like "duh, how no one tested this before" On 9/13/07, jdalton <[EMAIL PROTECTED]> wrote: > > > Hi all, > > I was just reading on ajaxian that Steven Levithan has done some > benchmarks and found that innerHTML's main bottle neck is in its > destruction of existin

[Prototype-core] Element.update() speed boost

2007-09-13 Thread jdalton
Hi all, I was just reading on ajaxian that Steven Levithan has done some benchmarks and found that innerHTML's main bottle neck is in its destruction of existing nodes/elements. He has posted a new method. He has benchmarks and a performance test as well. I figured it would be an interesting addi