]>
git.proxmox.com Git - extjs.git/blob - extjs/packages/core/src/dom/UnderlayPool.js
2 * Private utility class that manages the internal cache for {@link Ext.dom.Shadow Underlays}
3 * and {@link Ext.dom.Shim Shims}.
6 Ext
.define('Ext.dom.UnderlayPool', {
10 * @param {Object} elementConfig A {@link Ext.dom.Helper DomHelper} config object to
11 * use for generating elements in the pool.
13 constructor: function(elementConfig
) {
14 this.elementConfig
= elementConfig
;
19 * Checks an element out of the pool.
20 * @return {Ext.dom.Element}
22 checkOut: function() {
23 var el
= this.cache
.shift();
26 el
= Ext
.Element
.create(this.elementConfig
);
27 el
.setVisibilityMode(2);
29 // tell the spec runner to ignore this element when checking if the dom is clean
30 el
.dom
.setAttribute('data-sticky', true);
38 * Checks an element back into the pool for future reuse
39 * @param {Ext.dom.Element} el
41 checkIn: function(el
) {
46 * Reset the pool by emptying the cache and destroying all its elements
49 var cache
= this.cache
,