[JSMentors] Re: Internet Explorer event handler leaks

2011-01-06 Thread james
Great article! I have a long running single page javascript application so I am well aware of the problems with IE and garbage collecting :) Basically what I tend to do to make sure I dont keep any references around is to act like there is no garbage collecting and use a destructor function

Re: [JSMentors] Re: Internet Explorer event handler leaks

2011-01-06 Thread Peter van der Zee
Actually there was some discussion on twitter related to this. Jed drew a simple conclusion; expando's win in speed from alternative methods. http://twitter.com/jedschmidt/status/22784074045198338 The way I solved the leak pattern at some point was to use the expando pattern and store the

[JSMentors] select text from an element and insert into another element

2011-01-06 Thread Daniel Donaldson
i've got a couple of lists, and what i'd like to happen is when the user clicks an item on the first list, the text from the clicked item is appended to the text of a list item in the second list. i've tried: $(.take li).click(function(){ $(this).text($(.place)).append();

Re: [JSMentors] Re: substitutes for arguments and arguments.callee in ECMAScript 5

2011-01-06 Thread Nick Fitzgerald
While the topic of IE and NFEs is being discussed (accidentally?), does anyone know if this bug is fixed in IE9? Thanks! _Nick_ On Thu, Jan 6, 2011 at 10:00 AM, kangax kan...@gmail.com wrote: On Jan 5, 4:27 pm, Kyle Simpson get...@gmail.com wrote: ? There's a little more to it. IE9

[JSMentors] Re: Internet Explorer event handler leaks

2011-01-06 Thread Peter van der Zee
On Jan 6, 10:28 pm, Bryan Forbes br...@reigndropsfall.net wrote: So, you would do something like this when attaching the initial event, right?: if(typeof elem._id == undefined){     elem._id = generateEventHandlerID(); } Indeed I didn't go into it in the article, but IE has a property

Re: [JSMentors] select text from an element and insert into another element

2011-01-06 Thread Garrett Smith
On 1/6/11, Joe Lillibridge fwon...@gmail.com wrote: On 6/01/2011, at 1:15 PM, Daniel Donaldson wrote: i've got a couple of lists, and what i'd like to happen is when the user clicks an item on the first list, the text from the clicked item is appended to the text of a list item in the second

Re: [JSMentors] Re: Internet Explorer event handler leaks

2011-01-06 Thread Garrett Smith
On 1/6/11, Peter van der Zee qfo...@gmail.com wrote: On Jan 6, 10:28 pm, Bryan Forbes br...@reigndropsfall.net wrote: So, you would do something like this when attaching the initial event, right?: if(typeof elem._id == undefined){ elem._id = generateEventHandlerID(); } Indeed When