Attach ExtJS MVC controllers to DOM elements, not components

前端 未结 5 1442
执念已碎
执念已碎 2020-12-13 05:10

Is there a way to use the Ext.app.Controller control() method, but pass in a DOM query? I have a page that contains standard links and would like to add a click handler to

5条回答
  •  一个人的身影
    2020-12-13 05:37

    No, this seems not to be possible. The Ext.EventBus listens to events fired by ExtJS components. Your standard DOM elements do not fire those events. Additionally the query is checked with the ExtJS componets is( String selector ) method, wich can't be called by DOM elements. Someone might correct me if i'm wrong, but so i'm quite sure it's not possible, unfortunately.

提交回复
热议问题