|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
browser sniffing in dwrIn 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
|
|
|
Re: browser sniffing in dwrWe 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:
|
|
|
RE: browser sniffing in dwr
Oh,
probably just a handful of lines if we only want to detect IE. BTW: here's
MS's own instructions on how to detect it: http://msdn2.microsoft.com/en-us/library/ms537509.aspx
Should we settle with an on/off IE detection, or go deeper detecting
version and other browsers?
No,
I just tried this quick test in the address bar:
javascript: alert( !!document.all
)
Mozilla -> false
Opera -> true
Best
regards
Mike
|
|
|
Re: browser sniffing in dwrI think that we should perhaps detect browsers that we support, but not expose the detection to users because then we have a greater requirement for accuracy than "we'll it works for us" Joe. On 10/24/07, Mike Wilson <mikewse@...> wrote:
|
| Free Forum Powered by Nabble | Forum Help |