jmc42
4 Apr 2012, 7:55 AM
Hi
I am trying to override the getId method of Ext.Component using this code:
var baseMethod = Ext.Component.prototype.getId;
Ext.override(Ext.Component,{
getId: function() {
var id = baseMethod(arguments);
console.log("id: "+id);
return id;
} // getId
});
When I do this I get an error in Component.js:
actionEl.dom is undefined Component.js Line 353
initAria: function() {
350 var actionEl = this.getActionEl(),
351 role = this.ariaRole;
352 if (role) {
353 actionEl.dom.setAttribute('role', role);
354 }
355 },
Any ideas what is causing this to fall over?
James
I am trying to override the getId method of Ext.Component using this code:
var baseMethod = Ext.Component.prototype.getId;
Ext.override(Ext.Component,{
getId: function() {
var id = baseMethod(arguments);
console.log("id: "+id);
return id;
} // getId
});
When I do this I get an error in Component.js:
actionEl.dom is undefined Component.js Line 353
initAria: function() {
350 var actionEl = this.getActionEl(),
351 role = this.ariaRole;
352 if (role) {
353 actionEl.dom.setAttribute('role', role);
354 }
355 },
Any ideas what is causing this to fall over?
James