A correction in the above two lines: // detect IE any version IE = typeof context.fileSize !== 'undefined',
// Safari 2 doesn't implement View on window S2 = top.defaultView && top !== top.document.defaultView, I left out part of the Safari check... Diego On 13 Gen, 04:01, Diego Perini <diego.per...@gmail.com> wrote: > John, > even if you didn't completely removed $.browser it is great to see > most of them are gone. > > Next move is to go for feature testing, plugin writers should already > start using it to speed-up the complete removal. At least they should > have a direction to follow from the team in the process of removing/ > changing $.browser... I believe it can be made painless enough for the > developers. > > 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 > > 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. > > I purposely picked the two that are not feature testing...but these > will avoid a great amount of code in 95% of the cases, probably more > if we look at use cases. > > Let me know what you think about it. > > Diego > > On 12 Gen, 21:09, "John Resig" <jere...@gmail.com> wrote: > > > Just to clarify: $.browser is not being removed in 1.3 - and not for > > the foreseeable future - but it is deprecated. > > > --John > > > On Mon, Jan 12, 2009 at 3:04 PM, Dan G. Switzer, II > > > <dswit...@pengoworks.com> wrote: > > > > Boy, I'm not looking forward to $.browser.msie being removed. I use > > > that all the time to add class definitions to fix CSS issues in IE. > > > > On Mon, Jan 12, 2009 at 9:03 AM, Jörn Zaefferer > > > <joern.zaeffe...@googlemail.com> wrote: > > >> Nevermind, got it all fixed. > > > >> Jörn > > > >> On Mon, Jan 12, 2009 at 1:14 PM, Jörn Zaefferer > > >> <joern.zaeffe...@googlemail.com> wrote: > > >>> Forgot to mention: version.txt has RC2 already, I did a local build to > > >>> get the latest fixes. > > > >>> Anyway, that wasn't my problem anyway. $.browser is deprecated just > > >>> now, so I can worry about removing that later. > > > >>> Jörn > > > >>> On Mon, Jan 12, 2009 at 12:32 PM, Ariel Flesler <afles...@gmail.com> > > >>> wrote: > > > >>>> Isn't it RC1 yet ? > > > >>>> The $.browser removal is a hard one. I fixed it on one plugin already > > >>>> as "if( document.attachEvent )" of course that doesn't move to feature > > >>>> detection, but sometimes you just want to know if it's IE, no feature > > >>>> related. > > > >>>> -- > > >>>> Ariel Flesler > > >>>>http://flesler.blogspot.com > > > >>>> On Jan 12, 8:29 am, "Jörn Zaefferer" <joern.zaeffe...@googlemail.com> > > >>>> wrote: > > >>>>> I'm currently adapting the validation plugin to 1.3 RC2, aiming for a > > >>>>> new release before 1.3 is out. The obvious problem, usage of > > >>>>> deprecated [...@attr=val] selectors was easy to fix. > > > >>>>> Another issue I couldn't fix yet is selecting options. I'm using these > > >>>>> lines to validate if enough options have been selected: > > > >>>>> var options = $("option:selected", element); > > >>>>> return options.length > 0 && ( element.type == "select-multiple" || > > >>>>> ($.browser.msie && !(options[0].attributes['value'].specified) ? > > >>>>> options[0].text : options[0].value).length > 0); > > > >>>>> It seems like $("option") in 1.3 RC2 returns only a single option on > > >>>>> my testpage, causing all tests related to selects to fail. Is there an > > >>>>> alternative that I can use that also works with 1.2.6? > > > >>>>> There are more which I haven't yet pinned down... > > > >>>>> Jörn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---