« Return to Thread: browser sniffing in dwr

Re: browser sniffing in dwr

by Joe Walker-3 :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.

We could steal some code from Dojo, how much code do you think we would need to add?

Doesn't Opera do silent document.all in the same way that Moz does?

Joe.

On 10/24/07, Mike Wilson <mikewse@...> wrote:
In engine.js we have:
    // In IE XHR is an ActiveX control so you can't augment it like this
    if (!document.all) batch.req.batch = batch;
 
This object sniff will affect Opera, as it defines document.all just like IE, so an alternative sniff may be appropriate. Even better might be to extract this functionality into a separate method _isIE() and maybe considering factoring out other browser sniffs if appropriate? (or maybe all other tests can be done as object sniffs)
 
Browser sniffing can be made arbitrarily complex (look at http://www.quirksmode.org/js/detect.html and http://svn.dojotoolkit.org/dojo/dojo/trunk/_base/_loader/hostenv_browser.js ) so I am not sure how much of this we want to do in DWR, but we may have use of some of this knowledge in future util.js.
Opinions?
 
Best regards
Mike

 « Return to Thread: browser sniffing in dwr

LightInTheBox - Buy quality products at wholesale price