Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IPageElementListOpts<Store, PageElementType, PageElementOpts>

Describes the opts parameter passed to the constructor function of PageElementList.

template

Store type of the PageNodeStore instance which can be used to retrieve/create PageNodes

template

PageElementType type of the PageElement managed by PageElementList

template

PageElementOpts type of the opts parameter passed to the constructor function of the PageElements managed by PageElementList

Type parameters

Hierarchy

Index

Properties

Optional disableCache

disableCache: boolean

By default, the results of an "identification process" (the last invocation of PageElementList's identify function) are cached for future invocations of PageElementList's identify function.

If disableCache is set to true, this caching of identification results will be disabled and a new "identification process" will be performed on each invocation of PageElementList's identify function.

Disabling the identification results cache can be useful if the contents of a PageElementList change often. If the contents of a PageElementList rarely change, PageElementList's identify function can be invoked with the resetCache option set to true in order to repeat the "identification process" for a changed page content.

elementOpts

elementOpts: PageElementOpts

the options passed to elementStoreFunc to configure the retrieved PageElement instance

elementStoreFunc

elementStoreFunc: function

This function retrieves an instance of a PageElement mapped by PageElementList from the list's PageNodeStore.

param

the XPath expression used to identify the retrieved PageElement in the DOM

param

the options used to configure the retrieved PageElement

Type declaration

    • (selector: string, opts: PageElementOpts): PageElementType
    • Parameters

      • selector: string
      • opts: PageElementOpts

      Returns PageElementType

Optional identifier

identifier: IPageElementListIdentifier<Store, PageElementType>

This is the default identifier used to identify a PageElementList's managed PageElements via the key names defined in identifier's mappingObject by matching mappingObject's values with the return values of identifier's mappingFunc.

This default identifier can be overwritten by passing a custom identifier in the function parameters of PageElementList's identify function.

Optional interval

interval: number

An interval in milliseconds.

store

store: Store

an instance of PageNodeStore which can be used to retrieve/create PageNodes

Optional timeout

timeout: number

A timeout in milliseconds.

Generated using TypeDoc