Sha256: d4ef2061e77c93201c7d59b3a322fef023bcb9dad474d63016a6e0c80a8a2361
Contents?: true
Size: 316 Bytes
Versions: 22
Compression:
Stored size: 316 Bytes
Contents
class Atome def geolocation localisation = {latitude: nil, longitude: nil} $window.navigator.geolocate.then do |pos| localisation[:latitude] = pos.coords.latitude localisation[:longitude] = pos.coords.longitude end.rescue do |err| p err localisation = nil end end end
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
atome-0.5.1.1 | lib/atome/renderers/opal/extensions/geolocation.rb |
atome-0.4.7.0 | lib/atome/renderers/opal/extensions/geolocation.rb |