конечно instanceof сработает
<!DOCTYPE html>
<html>
<head>
<title>demo</title>
<script src='//cdn.sencha.io/ext-4.2.0-gpl/ext-all.js'></script>
<link rel="stylesheet" href="//cdn.sencha.io/ext-4.2.0-gpl/resources/css/ext-all.css">
<script>
Ext.onReady(function() {
Ext.define('User', {
extend: 'Ext.data.Model',
fields: [ 'name', 'phone' ]
});
var userStore = Ext.create('Ext.data.Store', {
model: 'User',
data: [
{ name: 'Lisa', phone: '555-111-1224' },
{ name: 'Bart', phone: '555-222-1234' }
]
});
var myGrid = Ext.create('Ext.grid.Panel', {
renderTo: Ext.getBody(),
store: userStore,
width: 300,
title: 'Application Users',
columns: [
{
text: 'Name',
width: 100,
dataIndex: 'name'
},{
text: 'Phone Number',
flex: 1,
dataIndex: 'phone'
}
]
});
alert(myGrid instanceof Ext.panel.Table); // true
alert(myGrid instanceof Ext.panel.Panel); // true
alert(myGrid instanceof Ext.button.Button); // false
});
</script>
</head>
<body></body>
</html>