Identification Function per Toolkit
Description
Returns the test object class name of the custom control.
Syntax
function <get class name>()
Return Value
If an element is the root of the custom control, returns the test object class name. Otherwise, returns null.
Remarks
Example
This example shows a function that handles all custom controls for a toolkit.
From the toolkit configuration file:
<Controls>
<CommonIdentification type="javascript"
file_name="MyControls.js" function="ControlFromElement"/>
...
</Controls>
From MyControls.js:
function ControlFromElement()
{
if !(_elem.className) return null;
var clName = _elem.className;
if (clName.indexOf('myToolKit-Calendar')
{return "myToolKit-Calendar";}
if (clName.indexOf("myToolKit-Spinner")
{return "myToolKit-Spinner";}
.....
return null;
}