开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜