exside / geo-location-javascript

Automatically exported from code.google.com/p/geo-location-javascript
0 stars 0 forks source link

Check for Google Gears is inadequate #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using geo-location-javascript v0.4.3 on Windows XP box with IE8 and no gears 
installed, the following error occurs:

  "error google.gear.factory is null or not and object"

This error appears, because the following line is an inadequate check for gears:
  else if(typeof(window.google)!="undefined")

The solution is to replace this line with:
  else if(window.google && google.gears)

Google Gears API docs recommends this check (see 
http://code.google.com/apis/gears/design.html#detecting)

Original issue reported on code.google.com by stephen....@gmail.com on 7 Jul 2010 at 4:35

GoogleCodeExporter commented 9 years ago
Oops. The replacement line is:

  else if(typeof(window.google)!="undefined" && typeof(google.gears)!="undefined")

Original comment by stephen....@gmail.com on 7 Jul 2010 at 4:42

GoogleCodeExporter commented 9 years ago
updated, thanks for the help

Original comment by whoiss...@gmail.com on 12 Jul 2010 at 9:40