Given these functions for determining user location:
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
}
else {
alert("Geolocation is not supported by this browser.");
}
}
function showPosition(position) {
var lat = position.coords.latitude;
var lon = position.coords.longitude;
}
I have a high level understanding of how it is working, but I cannot for the life of me find where position.coords.latitude is coming from in the window object.
It makes sense for it to be in window.position.coords.latitude.... OR in somewhere in window.navigator.geolocation...
But it doesn't appear in either of those locations when I console.log the window.
Where is this located in the window object?