Because Modernizr (http://modernizr.com) already does these sorts of tests, it seemed that it could act as a plugin conduit to achieve the same goal.
So in the current dev master of Modernizr, jQuery.support will be extended with the test results. http://github.com/Modernizr/Modernizr Enrique and Louis-Remi, do you think that makes sense? Useful or unnecessary? Paul On Nov 13, 7:13 pm, lrbabe <lrb...@gmail.com> wrote: > I don't think it's a good idea because not all developers use border- > radius or expressions. > It could make a valuable plugin (if not already existing), though. > > On Nov 14, 12:28 am, Daniel Friesen <nadir.seen.f...@gmail.com> wrote: > > > Don't forget -khtml, WebKit also supports it, but I recall reports that > > some versions of Konqueror support it using -khtml. > > Also, it's future compat, but one of the Opera devs said that if they > > did implement it in Opera they would be using -o-border-radius if not > > the standard border-radius at that point. > > > The thing about border radius to be careful of though is -moz's > > alternate method of specifying corners. > > > ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name] > > > Enrique Mel ndez Estrada wrote: > > > Hi, > > > Sorry if I'm completely wrong but I'd suggest to add to the core the > > > following "supports" (If you think they are interesting for everyone): > > > > jQuery.support = { > > > .... > > > // check if expressions exists (for IE7- and IE8, not in standard > > > IE8 mode...) so programatically and "optimally" > > > // you could add wc3 css standard behaviors not implemented in IEs... > > > expression : typeof div.style.setExpression !== "undefined", > > > > // check if the browser supports "border-radius": return null (or > > > false) if not.... > > > // but if true, then return the css prefix to add to standard: "", > > > "-moz-", "-webkit-" + "border-radius" > > > // This kind of check is used a lot in plugins, and I think this is > > > the fastest/easiest way... > > > borderRadius : (typeof div.style.borderRadius !== "undefined") ? "" > > > : (typeof div.style.WebkitBorderRadius !== "undefined") ? "-webkit-" : > > > (typeof div.style.MozBorderRadius !== "undefined") ? "-moz-" : null; > > > .... > > > } > > > > Now I'm using functions like this: > > > > function hasBorderRadius(){ > > > var d = document.createElement("div").style; > > > if (typeof d.borderRadius !== "undefined") return ""; > > > if (typeof d.WebkitBorderRadius !== "undefined") return > > > "-webkit-"; > > > if (typeof d.MozBorderRadius !== "undefined") return "-moz-"; > > > return null; > > > }; > > > function hasSetExpression(){ > > > var d = document.createElement("div").style; > > > return typeof d.setExpression !== "undefined"; > > > } > > > > , thanks a lot -- You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-...@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.