Get type of component


#1

Is there any possibility to get comonent type? i mean, for example:

var grid = new dhtmlXGridObject(...);
// How to get, that "grid" variable is Grid component, not Toolbar or etc.

#2

There is no standard API to get the type of component, you can use some kind of feature detection

if (grid.cells){ //grid } else if (grid.addButton){ //toolbar }