[mapguide-internals] Re: better browser detection logic (basic viewer)

Zac Spitzer zac.spitzer at gmail.com
Sat Jul 10 22:21:47 EDT 2010


even better would be to move this into browserdetect.js as a function,

function getAttributeValueCozIE6isCrap(tgt, attr){
return (!msie6minus) ? tgt.attributes[attr].nodeValue: tgt[attr];
}

anyone got a good suggestion for the function name coz that just doesn't
feel right and we should avoid using a generic function name which
might conflict

z



On 11 July 2010 11:52, Zac Spitzer <zac.spitzer at gmail.com> wrote:
> Right button context menu doesn't work in Opera or Chrome
> http://trac.osgeo.org/mapguide/ticket/1274
>
> looks like this changeset for chrome fixes will fix things for opera as well
>
> http://trac.osgeo.org/mapguide/changeset/4267
>
> alas the fixes were committed against unrelated trac issues
> anyway there's lots of this pattern
>
> var name = (chrome || firefox || safari3plus) ?
> obj.attributes["name"].nodeValue: obj.name;
>
> through the code, which to fix for opera would requires this
>
> var name = (opera || chrome || firefox || safari3plus) ?
> obj.attributes["name"].nodeValue: obj.name;
>
> which pretty much is equivalent to saying, not msie6, suprise suprise
> :) as this works in IE7
>
> How about i change all this logic in 4267 to be (!msie6minus) ?
>
> z
>
>
>
> --
> Zac Spitzer
> Solution Architect / Director
> Ennoble Consultancy Australia
> http://www.ennoble.com.au
> http://zacster.blogspot.com
> +61 405 847 168
>



-- 
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168


More information about the mapguide-internals mailing list