Web Add-in Extensibility Developer Guide > JavaScript Function Reference > Identification and Filter Functions > Filter Function

Filter Function      

Description

Identifies the children of the control to learn.

Syntax

function <children to learn>()

Return Value

A safe array of the child objects to learn.

Remarks

Define the name of the function in a Control\Filter\Learn element in the toolkit configuration file.

Example

In this example, all child input elements are to be learned.

From the toolkit configuration file:

<Filter>

    <Learn learn_control="Yes" learn_children="CallFilterFunc" type="javascript" function="GetChildrenToLearn" />

</Filter>

Implementation of GetChildrenToLearn:

// This function instructs UFT to learn input child objects

// together with the object.

function GetChildrenToLearn()

{

    return toSafeArray( _elem.getElementsByTagName("input") );

}