Sha256: be8a1774399f0c73127d3812c10dea328c9db6f853cc21216b9cc0d0295499ac
Contents?: true
Size: 330 Bytes
Versions: 11
Compression:
Stored size: 330 Bytes
Contents
# frozen_string_literal: true 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 nil end end end
Version data entries
11 entries across 11 versions & 1 rubygems