Also, I can officially say that I have made Cases! Which is probably the happiest I have ever been getting an error.
It can automatically detect an error, here's an example of my code:
function locateFail(geoPositionError) {
switch (geoPositionError.code) {
case 0:
alert('An unknown error occurred, sorry');
I have a total of 4 cases, including how the browser doesn't support GeoLocation, you don't have your location set up, unknown, and timed out. It's really cool, and I have always wondered how websites detect errors when they are happening. I have been really loving this class, and this HTML5 book is really helping me out with everything. I'm glad this book was purchased!
No comments:
Post a Comment