Skip to main content Link Search Menu Expand Document (external link)

Low-level Effect wrappers for Location and its usage via Context.

Added in v8.19.0


Table of contents


actions

canShare

Check to see if the current navigator can share

Signature

export declare const canShare: (shareData?: ShareData) => Effect.Effect<boolean, never, Navigator>

Added in v8.19.0

share

Share data with the current navigator

Signature

export declare const share: (shareData: ShareData) => Effect.Effect<void, never, Navigator>

Added in v8.19.0

storeCredential

Store a Credential

Signature

export declare const storeCredential: (credential: Credential) => Effect.Effect<void, never, Navigator>

Added in v8.19.0

writeClipboard

Write clipboard items

Signature

export declare const writeClipboard: (items: ClipboardItems) => Effect.Effect<void, never, Navigator>

Added in v8.19.0

writeClipboardText

Write text from the clipboard

Signature

export declare const writeClipboardText: (text: string) => Effect.Effect<void, never, Navigator>

Added in v8.19.0

constructors

createCredential

Create a new Credential

Signature

export declare const createCredential: (
  options?: CredentialCreationOptions
) => Effect.Effect<Option<Credential>, never, Navigator>

Added in v8.19.0

makeClipoboardItem

Create a new ClipboardItem

Signature

export declare const makeClipoboardItem: (
  items: Record<string, string | Blob | PromiseLike<string | Blob>>,
  options?: ClipboardItemOptions | undefined
) => Effect.Effect<ClipboardItem, never, GlobalThis>

Added in v8.19.0

context

A Context for the Navigator API

Signature

export declare const Navigator: Context.Tagged<Navigator, Navigator>

Added in v8.19.0

getters

checkCookieEnabled

Check to see if the current navigator can utilize cookies

Signature

export declare const checkCookieEnabled: Effect.Effect<boolean, never, Navigator>

Added in v8.19.0

checkOnline

Check to see if the current navigator is online

Signature

export declare const checkOnline: Effect.Effect<boolean, never, Navigator>

Added in v8.19.0

checkPdfViewerEnabled

Check to see if the current navigator has a PDF viewer

Signature

export declare const checkPdfViewerEnabled: Effect.Effect<boolean, never, Navigator>

Added in v8.19.0

getCredential

Get a Credential

Signature

export declare const getCredential: (
  options?: CredentialRequestOptions
) => Effect.Effect<Option<Credential>, never, Navigator>

Added in v8.19.0

getCurrentPosition

Get the current navigator’s geolocation

Signature

export declare const getCurrentPosition: (
  options?: PositionOptions
) => Effect.Effect<GeolocationPosition, GeolocationPositionError, Navigator>

Added in v8.19.0

getHardwareConcurrency

Check to see if the current navigator concurrency

Signature

export declare const getHardwareConcurrency: Effect.Effect<number, never, Navigator>

Added in v8.19.0

getMaxTouchPoints

Check to see if the current navigator’s max touch points

Signature

export declare const getMaxTouchPoints: Effect.Effect<number, never, Navigator>

Added in v8.19.0

getMediaDevices

Check to see if the current navigator has any media devices

Signature

export declare const getMediaDevices: Effect.Effect<MediaDevices, never, Navigator>

Added in v8.19.0

getMediaSession

Check to see if the current navigator has any media sessions

Signature

export declare const getMediaSession: Effect.Effect<MediaSession, never, Navigator>

Added in v8.19.0

getUserAgent

Get the current navigator’s user agent

Signature

export declare const getUserAgent: Effect.Effect<string, never, Navigator>

Added in v8.19.0

readClipboard

Read from the clipboard

Signature

export declare const readClipboard: Effect.Effect<ClipboardItems, never, Navigator>

Added in v8.19.0

readClipboardText

Read text from the clipboard

Signature

export declare const readClipboardText: Effect.Effect<string, never, Navigator>

Added in v8.19.0

models

A Context for the Navigator API

Signature

export interface Navigator extends globalThis.Navigator {}

Added in v8.19.0