W3C Geolocation API: Difference between revisions

Content deleted Content added
m Example code: capitalization, replaced: html → HTML
Line 25:
 
===Example code===
Simple [[JavaScript]] code that checks if the browser has the Geolocation API implemented and then uses it to get the current position of the device. this code creates a function which can be called on htmlHTML using <code><body onload="geoFindMe()"></code>:
<source lang="javascript">
const geoFindMe = () => {