Options
All
  • Public
  • Public/Protected
  • All
Menu

Configures behaviour of watch method

Hierarchy

  • WatchOptions

Index

Properties

Optional anchor

anchor: string

Custom anchor. Set this if you do not wish to anchor the watch method using inputField or outputFields.line_1

default

undefined

Optional getScope

getScope: (anchor: HTMLElement) => null | HTMLElement

Sets the scope in which the AddressFinder can operate. Set to null to mark the whole page as in scope

A function which provides the anchor as the first argument. The operable scope must be returned. By default the parent <form> element is returned

default

Immediate

parent of anchor

Type declaration

    • (anchor: HTMLElement): null | HTMLElement
    • Parameters

      • anchor: HTMLElement

      Returns null | HTMLElement

Optional immediate

immediate: boolean

Whether to immediately invoke bind

default

true

Optional interval

interval: number

Set the periodicity of page checks in milliseconds

default

1000

Optional onAnchorFound

onAnchorFound: OnAnchorFound

Callback executed when anchor and its scope is detected

default

NOOP

Optional onBind

onBind: (c: Controller) => void

Callback executed when an AddressFinder instance successfully binds

default

NOOP

Type declaration

Optional onBindAttempt

onBindAttempt: OnBindAttempt

Callback executed each time bind is attempted

default

NOOP

Optional onError

onError: (error: unknown) => void

Error callback. Executes when API Key check fails. Does not execute if API request succeeds but key is marked as unavailable

Type declaration

    • (error: unknown): void
    • Parameters

      • error: unknown

      Returns void

Optional pageTest

pageTest: () => boolean

A function executed on every interval to determine whether binding should take place

default

() => true

Type declaration

    • (): boolean
    • Returns boolean