PDA

View Full Version : Global variable "d"



pcorcoran
13 Jun 2007, 9:57 AM
In Element.prototype, Ext is defining:

calcOffsetsTo : function(el){
el = Ext.get(el), d = el.dom;

The variable d becomes global. Is this intentional? Is it necessary?

thanks,
Patrick

efege
13 Jun 2007, 10:28 AM
I just had a look at the online docs for Ext 1.1b1, and it's fixed:
http://extjs.com/deploy/ext/docs/output/Element.jss.html

Ext 1.0:

calcOffsetsTo : function(el){
el = Ext.get(el), d = el.dom;



Ext 1.1b1:

calcOffsetsTo : function(el){
el = Ext.get(el);
var d = el.dom;