ajaxexample (AT) gmail (DOT) com wrote:
Quote:
On Aug 14, 11:33 am, "Aaron Gray" <ang.use... (AT) gmail (DOT) com> wrote:
What the hell is going on in source/adapter/ext-base.js on lines 36 and
45, Ext.lib.Dom.getViewportHeight and Width ?
It seems to be using 'self' which seems to come from no where ? [...] |
Please trim your quotes to the parts that you are referring to.
Quote:
That use of self looks incorrect! |
It is certainly unwise, but not incorrect.
Quote:
Usually people do `var self = this;` and I found that other places in the
code, but in ext-base.js it looks like it's being used without getting
set. Does that throw an error? |
It would throw a ReferenceError exception if there was no object in the
scope chain to have such a property. After all, the `self' property of
Window objects (which would refer to its owner), and Window objects
themselves, are proprietary and host-dependent features.
Don't.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann