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 on every
> created node called `uniqueNumber`:
> ...
> I've taken the same approach in uber.js.  If you can avoid expandos in
> IE, you should.

Ok, I didn't know about that. I've luckily never run into problems
though and it's the only expando I use. Oh and that's not an excuse or
anything :)

> Attaching an `onbeforeunload` handler will break bfcache:
>
> https://developer.mozilla.org/En/Using_Firefox_1.5_caching
>
> If you have a massive application, it would probably be best not to have
> to re-initialize (reparse the DOM, etc.) it when navigating back to it.

Yes, that it does. Otoh, if you don't relinquish the array, IE will
leak. And there's no way of detecting whether the user will want to be
using the bfcache. (On a side note, I think that thing (bfcache) is
evil, it cost me a few frustrating hours at some point anyways).

- peter

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/jsmentors@jsmentors.com/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/jsmentors@googlegroups.com/

To unsubscribe from this group, send email to
jsmentors+unsubscr...@googlegroups.com

Reply via email to