I am working on a site that uses HTML5 Geolocation. Here is code I am using:
html:
<button onclick="getLocation()">Try It</button>
js
function getLocation() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(showPosition);
  } else {
    console.log('Geolocation is not supported by this browser.');
  }
}
function showPosition(position) {
  console.log(position.coords);
  alert(position.coords.latitude);
  alert(position.coords.longitude);
}
Everything seem to works well, but some users are getting KCLError Domain error. Here are their comments:
- This happens regardless of browser - Safari and Chrome both affected(tablet);
- Presumably the error occurred internally and isn't displayed on the screen;
- When a user presses 'button' it shows the error and fails.
I did not found any solution or reasons related to HTML about this error.

 
     
     
    