2 ms·
> or faster than using document.getElementById The bit to explain is that Ext.fly (and jQuery() for that matter) don't return actual DOM elements like document
by DougBTX 18y ago
> or faster than using document.getElementById
The bit to explain is that Ext.fly (and jQuery() for that matter) don't return actual DOM elements like document.getElementById does. Instead they return a Javascript object which you can use to interact with the DOM element(s) using a different API.
Both are probably slower than document.getElementById, but allow you to program at a higher level of abstraction. For example, jQuery(".foo").someMethod() could act on many DOM elements, but document.getElementById().someMethod() can only act on one.