The referred code is from UserAgentPropertyGenerator.

On Aug 13, 6:06 pm, Rick Li <[email protected]> wrote:
> I find a workround, if I comment out the chromeframe check it would be
> ok.
>
> I'm not sure why it's needed, it only checks the chromeframe plugin is
> installed but doesn't check if it's activated or not.
>
> in my IE8 + chromeframe 13, if it's activated, the userAgent would
> already contain "webkit".
>
>       // webkit family (chrome, safari and chromeframe).
>       new UserAgentPropertyGeneratorPredicate("safari")
>       .getPredicateBlock()
>         .println("return (")
>           .println("(ua.indexOf('webkit') != -1)")
>           .println("||")
>           .println("(function() {")
> /*
>   .println("if (ua.indexOf('chromeframe') != -1) {")
>               .println("return true;")
>             .println("}")
>             .println("if (typeof window['ActiveXObject'] !=
> 'undefined') {")
>               .println("try {")
>                 .println("var obj = new
> ActiveXObject('ChromeTab.ChromeFrame');")
>                 .println("if (obj) {")
>                   .println("obj.registerBhoIfNeeded();")
>                   .println("return true;")
>                 .println("}")
>               .println("} catch(e) { }")
>             .println("}")
> */
>             .println("return false;")
>             .println("})()")
>         .println(")")
>       .returns("'safari'"),

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to