How to check whether one class is inhereted of another class?
I'm using Ext4...
How to check whether one class is inherited of another class?
for example:
Ext.define("A", {});
Ext.define("B", { extend: "A" });
Ext.define("C", { extend: "B" });
var a = Ext.create("A");
var c = Ext.create("C");
I need something like this: c 开发者_高级运维instanceof a
???
Thanks
(Based on @troelskn 's comment)
http://jsfiddle.net/miriam/ugQHB/
c instanceof A
returns true.
You can use isXtype method. See docs here: Ext.AbstractComponent
精彩评论