-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving geolocation test to feature-detects/geolocation.js
- Loading branch information
Showing
2 changed files
with
12 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
// geolocation is often considered a trivial feature detect... | ||
// Turns out, it's quite tricky to get right: | ||
// | ||
// Using !!navigator.geolocation does two things we don't want. It: | ||
// 1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513 | ||
// 2. Disables page caching in WebKit: webk.it/43956 | ||
// | ||
// Meanwhile, in Firefox < 8, an about:config setting could expose | ||
// a false positive that would throw an exception: bugzil.la/688158 | ||
|
||
Modernizr.addTest('geolocation', Modernizr.geolocation = 'geolocation' in navigator); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters