Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor wording fix #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ch3_mockup.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ Actually, the Modernizr loader internally utilizes a tiny (under 2Kb) resource l
})();
----

The code above invokes the function `load()`, which can take different arguments, but our example uses as an argument a specially prepared object with five properties: `test, yep, nope, complete`. The `load()` function will test the value of `Modernizr.geolocation` and if it's true, it'll load the scripts listed in the `yep` property. Otherwise it'll load the code listed in the `nope` array. The code in the get-native-geo-data.js gets the user's location the same way as it was done earlier in the section Integrating with Google Maps.
The code above invokes the function `load()`, which can take different arguments, but our example uses as an argument a specially prepared object with four properties: `test, yep, nope, complete`. The `load()` function will test the value of `Modernizr.geolocation` and if it's true, it'll load the scripts listed in the `yep` property. Otherwise it'll load the code listed in the `nope` array. The code in the get-native-geo-data.js gets the user's location the same way as it was done earlier in the section Integrating with Google Maps.

Now let's consider the "nope" case. The code of the get-geo-data-by-ip.js has to offer an alternative way of getting the location for the browsers that don't support HTML5 Geolocation API. We found the GeoIP JavaScript API offered by http://www.maxmind.com/[MaxMind, Inc.]. Their service returns country, region, city, latitude and longitude, which can serve as a good illustration of how a workaround of a non-supported feature can be implemented. The code in get-geo-data-by-ip.js is very simple for now.

Expand Down