fmtvp/tal — pull request #132 by rsjtaylor (2014-03-17 15:09:21+00:00)
Title: DOM Culling / Hiding widget strips

Adds two new widget strips. Both will only create DOM elements when they are needed for an alignment.
* CullingStrip - Creates and/or adds widgets to the DOM before an alignment so all that will be visible during the alignment are present, removes elements outside the mask after an alignment
* HidingStrip - Creates, adds and/or shows DOM elements to enable alignment animations, hides (sets visibility hidden & opacity 0) to elements outside the mask after an alignment.

Both new strips should improve large page load times as only the elements visible after the initial alignment are created / laid out. Which is faster in use will depend on whether devices are paint or layout constrained and how the device optimises overflowed elements.

The HidingStrip may require fewer CSS changes to existing usage as elements aren't removed from flow once they exist.

This pull request also contains modifications to other areas of the carousel to enable these new features, but this shouldn't affect existing use so long as the internals of the carousel weren't being used directly (external behaviour shouldn't have changed)

It should be fairly straightforward to implement other out-of-mask behaviour (such as setting display: none on elements) by overriding createContext on CullingStrip to use a different set of states (see the HidingStrip and visibilitystates)