#15827 closed enhancement (fixed)
merge dojox/mobile/sniff into dojo/sniff
Reported by: | bill | Owned by: | Eric Durocher |
---|---|---|---|
Priority: | undecided | Milestone: | 1.9 |
Component: | DojoX Mobile | Version: | 1.7.3 |
Keywords: | Cc: | cjolif | |
Blocked By: | Blocking: |
Description
dojox/mobile/sniff detects a few things that dojo/sniff doesn't, like the version of iOS. That code should be rolled into dojo/sniff, and dojox/mobile/sniff should be removed (or at least deprecated).
Attachments (1)
Change History (13)
comment:1 Changed 10 years ago by
Milestone: | tbd → 2.0 |
---|
comment:2 Changed 10 years ago by
comment:4 Changed 10 years ago by
Milestone: | 2.0 → 1.9 |
---|
comment:5 Changed 10 years ago by
While doing so, it would be nice to also change the code such that has("ios") returns the ios version number when running on iOS. Currently, we need to use has("iphone") for this purpose, which is a bit misleading in my eyes.
comment:6 Changed 10 years ago by
Also, please update dojo/touch.js to take advantage of the ios version being defined by dojo/sniff.
comment:7 Changed 9 years ago by
Cc: | cjolif added |
---|
Notes on the patch:
- The "ios" (+ "iphone"/"ipad"/"ipod") and "bb" tests are moved to dojo/sniff, but other tests ("css3-animation", "svg") remain in dojox/mobile: "css3-animations" because we test only webkit, and I don't feel the test is general enough for use by other code, and also "svg" because there does not seem to be a need for it elsewhere. If anyone feels "svg" could be useful I can move it too (to dojo/has? since it checks the global SVGAngle window property?)
- As noted in the comments, the use of "iphone" as an alias to "ios" was confusing and "iphone" should be used in the future to test an actual iPhone device (like "ipad" and "ipod"). The old "iphone" value is still set in dojox/mobile/sniff for compatibility but is documented as deprecated, and all uses of "iphone" are renamed to "ios" in the code accordingly, as well as the .dj_iphone pseudo-class -> .dj_ios. Dojo/sniff sets "iphone" only on real iPhones.
- Also updated dojo/touch to use the new "ios" version value.
Changed 9 years ago by
Attachment: | 15827.patch added |
---|
Move dojox/mobile/sniff tests to dojo/sniff + rename "iphone" tests to " ios" - Eric Durocher (IBM, CCLA)
comment:8 Changed 9 years ago by
New patch:
- fixed single quotes -> double quotes for consistency
- moved has("svg") to dojo/sniff after all, it is useful for gfx
comment:9 Changed 9 years ago by
It looks OK to me. The code in dojo/sniff.js to get the iOS platform and version is a little long, but I guess that's unavoidable.
comment:10 Changed 9 years ago by
Ok. I will commit. I guess if someone comes up with a shorter version it will still be time to improve it.
Reminder to remove duplicated iOS 4 sniff code from dojo/touch when this is done (see #15831).