dom-pool

0.1.1 • Public • Published

dom-pool

Make your browser's life easier

How to use

var Pool = require('dom-pool');
var divPool = new Pool({
  tagName: 'div'
});

// Get a div
var div = divPool.pop();

// Give back a div
divPool.push(div);

// Allocate 100 divs
divPool.allocate(100);

// Get your SVG on
var circlePool = new Pool({
  namespace: 'http://www.w3.org/2000/svg',
  tagName: 'circle'
});

// Enjoy!

What browsers are supported?

Modern browsers and IE9+. Not passing a namespace parameter? Then the IE support expands to IE5+. If you'd like to support custom namespaces in IE8, check out aight.

Available on NPM & Bower

npm install dom-pool
bower install dom-pool

Readme

Keywords

Package Sidebar

Install

npm i dom-pool

Weekly Downloads

6

Version

0.1.1

License

ISC

Last publish

Collaborators

  • chrisantaki