Record\EventListening Element

Description

Event listening rules.

Important Information

If a function name is specified in the function attribute, UFT always calls this function to register to listen to events and specify the event handlers to use. If the use_default_event_handling or use_default_event_handling_for_children attributes are set to true, UFT first activates the default handling and then calls the specified function, overriding the default handling for any events handled in this function.

For details on using event handling, see the topic on event handling in the UFT online help.

Attributes

NameTypeUseDefaultDescription
file_namestringoptional The file system path to the file containing the function. If no path is specified, the default file name defined in the Control\Settings element is used.

You can specify a path relative to the <UFT installation folder>\dat\Extensibility\Web\Toolkits\<Toolkit name> folder.

functionstringoptional The name of the implementation function.
typestringoptionaljavascriptThe type of implementation function.
use_default_event_handlingbooleanoptionaltrueIndicates whether to use the default Web Event Configuration for handling events on this control.
use_default_event_handling_for_childrenbooleanoptionaltrueIndicates whether to use the default Web Event Configuration for handling events on this control's children.

Used By

Source

<xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="EventListening" minOccurs="0">
    <xs:annotation>
        <xs:documentation>Event listening rules.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
        <xs:attributeGroup ref="ImpFuncAttrs" />
        <xs:attributeGroup ref="EventListeningAttrs" />
    </xs:complexType>
</xs:element>