[dojo-contributors] what can has return

Rawld Gill rgill at altoviso.com
Wed Aug 3 04:32:20 EDT 2011

We started a debate on http://trac.dojotoolkit.org/ticket/13298 as to whether 
or not has can return something other than boolean. This seems important 
enough to bring the issue up here for discussion. And, it's time to make a 
decision...at least for 1.7.

I grep'd the code stack and the only place a has value other than true or 
false is being used is with has("ie") and has("safari"). These are easy enough 
to replace with dojo.isIE or dojo.isSafari.

Since the usage of has for other than boolean is so limited, I suggest we keep 
it simple and restrict it to boolean only.

I also suggest that dojo/_base/sniff return a hash of sniffed browser version 
numbers. Kris: I think you felt strongly that sniff should return has...could 
you remind us of your pov.


More information about the dojo-contributors mailing list