Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/index.ts>dom.Geolocation

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.Geolocation
import { type dom } from "https://deno.land/x/evt@v2.4.17/lib/index.ts";
const { Geolocation } = dom;

An object able to programmatically obtain the position of the device. It gives Web content access to the location of the device. This allows a Web site or app to offer customized results based on the user's location.

Methods

clearWatch(watchId: number): void
getCurrentPosition(
successCallback: PositionCallback,
errorCallback?: PositionErrorCallback,
options?: PositionOptions,
): void
watchPosition(
successCallback: PositionCallback,
errorCallback?: PositionErrorCallback,
options?: PositionOptions,
): number