Skip to content

Instantly share code, notes, and snippets.

@evanlong
Created November 4, 2011 07:56
Show Gist options
  • Save evanlong/1338876 to your computer and use it in GitHub Desktop.
Save evanlong/1338876 to your computer and use it in GitHub Desktop.
plane test
navigator.getcurrentposition(function(p){console.info(o)})
@jennylin
Copy link

jennylin commented Nov 4, 2011

navigator.getcurrentposition(function(p){console.info(o)})
TypeError
arguments: Array[2]
0: "getcurrentposition"
1: Navigator
appCodeName: "Mozilla"
appName: "Netscape"
appVersion: "5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1"
cookieEnabled: true
geolocation: Geolocation
proto: Geolocation
clearWatch: function clearWatch() { [native code] }
constructor: function Geolocation() { [native code] }
getCurrentPosition: function getCurrentPosition() { [native code] }
watchPosition: function watchPosition() { [native code] }
proto: Object
language: "en-US"
mimeTypes: DOMMimeTypeArray
onLine: true
platform: "MacIntel"
plugins: DOMPluginArray
product: "Gecko"
productSub: "20030107"
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1"
vendor: "Google Inc."
vendorSub: ""
proto: Navigator
length: 2
proto: Array[0]
message: "—"
stack: "—"
type: "undefined_method"
proto: Error

@evanlong
Copy link
Author

evanlong commented Nov 4, 2011 via email

@jennylin
Copy link

jennylin commented Nov 4, 2011

navigator.geolocation.getCurrentPosition(function(p){console.info(o)})
undefined

@evanlong
Copy link
Author

evanlong commented Nov 4, 2011 via email

@jennylin
Copy link

jennylin commented Nov 4, 2011

Ha, didn't even notice that. But no luck.

navigator.geolocation.getCurrentPosition(function(position){console.info(position.coords)})
undefined
navigator.geolocation.getCurrentPosition(function(pos){console.info(pos)})
undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment