Skip to content

Class: Finder

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Finder(target)

Parameters

NameType
targetILeaf

Defined in

in/packages/find/src/Finder.ts:28

Properties

target

Optional target: ILeaf

Defined in

in/packages/find/src/Finder.ts:10


innerIdMap

Protected innerIdMap: ILeafMap = {}

Defined in

in/packages/find/src/Finder.ts:12


idMap

Protected idMap: ILeafMap = {}

Defined in

in/packages/find/src/Finder.ts:13


findLeaf

Protected findLeaf: ILeaf

Defined in

in/packages/find/src/Finder.ts:15


methods

Protected methods: Object

Type declaration

NameType
id(leaf: ILeaf, name: string) => 0 | 1
innerId(leaf: ILeaf, innerId: number) => 0 | 1
className(leaf: ILeaf, name: string) => 0 | 1
tag(leaf: ILeaf, name: string) => 0 | 1
tags(leaf: ILeaf, nameMap: IBooleanMap) => 0 | 1

Defined in

in/packages/find/src/Finder.ts:17


__eventIds

Protected __eventIds: IEventListenerId[]

Defined in

in/packages/find/src/Finder.ts:25

Methods

getBy

getBy(condition, branch?, one?, options?): ILeaf | ILeaf[]

Parameters

NameType
conditionstring | number | IFindCondition | IFindMethod
branch?ILeaf
one?boolean
options?any

Returns

ILeaf | ILeaf[]

Implementation of

IFinder.getBy

Defined in

in/packages/find/src/Finder.ts:32


getByInnerId

getByInnerId(innerId, branch?): ILeaf

Parameters

NameType
innerIdnumber
branch?ILeaf

Returns

ILeaf

Implementation of

IFinder.getByInnerId

Defined in

in/packages/find/src/Finder.ts:62


getById

getById(id, branch?): ILeaf

Parameters

NameType
idstring
branch?ILeaf

Returns

ILeaf

Implementation of

IFinder.getById

Defined in

in/packages/find/src/Finder.ts:69


getByClassName

getByClassName(className, branch?): ILeaf[]

Parameters

NameType
classNamestring
branch?ILeaf

Returns

ILeaf[]

Implementation of

IFinder.getByClassName

Defined in

in/packages/find/src/Finder.ts:76


getByTag

getByTag(tag, branch?): ILeaf[]

Parameters

NameType
tagstring
branch?ILeaf

Returns

ILeaf[]

Implementation of

IFinder.getByTag

Defined in

in/packages/find/src/Finder.ts:80


getByMethod

getByMethod(method, branch?, one?, options?): ILeaf | ILeaf[]

Parameters

NameType
methodIFindMethod
branch?ILeaf
one?boolean
options?any

Returns

ILeaf | ILeaf[]

Implementation of

IFinder.getByMethod

Defined in

in/packages/find/src/Finder.ts:84


eachFind

Protected eachFind(children, method, list?, options?): void

Parameters

NameType
childrenILeaf[]
methodIFindMethod
list?ILeaf[]
options?any

Returns

void

Defined in

in/packages/find/src/Finder.ts:91


toChildren

Protected toChildren(branch): ILeaf[]

Parameters

NameType
branchILeaf

Returns

ILeaf[]

Defined in

in/packages/find/src/Finder.ts:108


__onRemoveChild

Protected __onRemoveChild(event): void

Parameters

NameType
eventChildEvent

Returns

void

Defined in

in/packages/find/src/Finder.ts:114


__checkIdChange

Protected __checkIdChange(event): void

Parameters

NameType
eventPropertyEvent

Returns

void

Defined in

in/packages/find/src/Finder.ts:120


__listenEvents

Protected __listenEvents(): void

Returns

void

Defined in

in/packages/find/src/Finder.ts:128


__removeListenEvents

Protected __removeListenEvents(): void

Returns

void

Defined in

in/packages/find/src/Finder.ts:135


destroy

destroy(): void

Returns

void

Implementation of

IFinder.destroy

Defined in

in/packages/find/src/Finder.ts:140

Released under the MIT License.