On Jan 31, 2006, at 10:19 AM, Beau Hartshorne wrote:
Instead of doing browser or object detects all over the MochiKit code, how about moving all of the hacks to a separate include file with all of the affected functions redefined, and ask people to include it with a conditional comment? This would lean out the core, speed things up a bit for everyone (fewer branches), but make using MochiKit a bit more complicated. I'm guessing that IE7 will try to emulate IE6, so it may break a lot of the object detection anyway. Thoughts?
IIRC, most of the code I've written that depends on a particular browser does the detection at load time, not at call time, so the branches thing isn't such an issue.
I don't think leaning out the core is relevant either, because MochiKit isn't very useful if it doesn't support IE at all. The users that have the convenience of ignoring the crappy browsers are going to be on a fast connection and/or can use gzip anyway so the saved KB or two is irrelevant.
As for IE7.. I don't understand what you mean by breaking the object detection. MochiKit's techniques for detecting which branch to use, at least the ones that I've written, should be quite robust. If IE7 isn't compatible I would be very surprised.
-bob
