![](/img/trans.png)
[英]How to use code in firefox console and get information about fired event in extjs4?
[英]How to get the last event fired on ExtJs
我正在嘗試創建服裝錯誤處理程序。 到目前為止,我已經可以使用以下代碼檢索由系統觸發的錯誤:
window.onerror = function(message, source, lineno, colno, error) {
me.errorHandler(error, true);
return true;
};
我的問題是:我想指定哪種事件或操作觸發了我的錯誤。
有沒有辦法找出觸發了什么事件/偵聽器/動作? 像使用Ext.util.Observable
我找到了解決方案。 它是這樣的;
//object is the main Page/Menu that i want to "Observate"
Ext.util.Observable.capture(object, function(){
//arguments have the listener, page and component
doStuff(arguments)
});
這樣做,每次在“對象”上觸發事件時,都會觸發此功能,並且我可以記錄錯誤或觸發事件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.