I'm using this code to determine whether a given variable is referencing a DataTable object or not:
if(undefined != myObjectVariable.$ && myObjectVariable.$.__dt_wrapper) {
alert('A DataTable Object');
} else {
alert('Not a DataTable Object');
}
Since __dt_wrapper
is an undocumented internal, I'm wondering how robust this is. I'm also concerned that there might be a set of variables where myObjectVariable.$
is defined, but myObjectVariable.$.__dt_wrapper
is not or is false. (I don't really understand what the $
is about.) Is there a better way to do this?