[dojo-contributors] Favor dojo.isWebKit vs. dojo.isSafari (or capability detection)

James Burke jburke at dojotoolkit.org
Sat Oct 11 19:17:07 EDT 2008

Dojo trunk now has dojo.isWebKit and dojo.isChrome. The details are here:

Now that we have a dojo.isWebKit (which gives versions like 525.3),
you may want to reconsider the use of dojo.isSafari in your code. As
always, capability detection is preferred to browser sniffing where

With these changes, Chrome no longer has a defined value for
dojo.isSafari, so if you were hoping of using that for the Chrome
case, you may want to reconsider. Hopefully dojo.isWebKit will fit the
need if you cannot use capability detection.

I suggest scrubbing your favorite module for dojo.isSafari use, to
make sure bad things do not happen with browsers like Chrome (besides
the alpha transparency issues/rounded corners -- I'm hoping Chrome
solves those on their own soon).

Another change with this update: dojo.isKhtml is only defined for
"Konqueror" user agents. There was only one place where this was used
specifically (in _base/html.js for selection code), but I updated it
to use dojo.isWebKit too. I do not think the dojo.isKhtml change is a
big change, since testing for dojo.isWebKit is probably more valuable,
but FYI.


More information about the dojo-contributors mailing list