On Jan 12, 10:01 pm, Diego Perini <[email protected]> wrote: [...]
> My suggestion is to start including these two constants in the process > of removing the others, they will never go away: > > IE = typeof document.fileSize != 'undefined', // IE6 / IE7 / IE8 > S2 = top !== top.document.defaultView, // Safari 2 This object inference doesn't seem like a much better solution than `userAgent` parsing. I can imagine 3rd party code having `document.fileSize` and accidentally messing things up. It's also not clear why anyone would want to "detect" IE in such way, when more robust ways are known - i.e. IE's conditional comments. On the other hand, if you were to introduce "IE" and "S2" - why skip "Opera" and/or "Konqueror", etc.? > > Please don't laugh...I know they are not feature testing. > > But these never changed and will never change, IE7 / IE8 are still > using that property (uniquely), S2 is still on 10.4.3 Mac, only two > short lines, can be shortened if "document" is aliased to correct > context, can execute before onload on both Webkit and all versions of > IE. Exactly which version of Safari are you talking about? I know that <=2.0.2 are missing `Object.prototype.hasOwnProperty`. Maybe we're talking about the same version. [...] -- kangax --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
