3 ms·
I must admit that I'm surprised $.browser is going to disappear in 1.9, not because removing it is a bad thing, but because of the number of scripts that is goi
by theallan 14y ago
I must admit that I'm surprised $.browser is going to disappear in 1.9, not because removing it is a bad thing, but because of the number of scripts that is going to break. Current jQuery UI, Bootstrap etc all use $.browser. There is presumably plenty of time before 1.9 for library authors to address this, but I can certainly see a lot of breakage coming.
- theallan 14y agoReplying to myself - but thinking about it further, there is something a little ironic about the result of removing $.browser in that testing for certain behaviour can in fact increase code size in libraries. For example testing the rendering behaviour of how scrollbar width is added to containers (simplifying the problem somewhat) is something we know happens in IE6/7, which is a nice easy line of jQuery at the moment, but actually testing for it will introduce more code into libraries which can no longer use these properties. I still don't think it is a bad thing to remove $.browser since it does encourage good code practice, but there is a lovely irony that to decrease code size in jQuery core, plug-ins will likely need to have increase their size.