<geolocation></geolocation>HTMLGeolocationElement: invalidReason property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
const geo = document.querySelector("geolocation");
console.log(geo.invalidReason);
// "", provided the `<geolocation>` element is not blocked in some way<geolocation>
Your browser doesn't support the <code><geolocation></code> element.
</geolocation>
<div id="cover">Cover element</div><p id="reason"></p><form>
<label for="invalidate"
>Choose a way to invalidate the
<code><geolocation></code> element:</label
>
<select id="invalidate">
<option value="">None</option>
<option value="move-behind">Move behind element</option>
<option value="move-out">Move outside viewport</option>
<option value="bad-contrast">Bad contrast</option>
</select>
</form>