Latest Version: 3.7 Final 20 December 2018

Reference Index

Master Objects

The following objects are created by the elementals.js library. Some of these are aliases to longer named objects that as developers we call all the time and are simply provided to save a few bytes and some typing.

_ "Underscore" Object
The "_" object is the core elementals object through which the majority of new functionality is accessed. This includes things like AJAX handling, event helpers, element creation, and NodeType mask constants.
Click here for Full Reference

Node Masking

Many Elementals fuctions allow you to mask the results based on a Element.tagName or a nodeMask. For more information on this see the _.Node.mask function, and the Node Masking page.

Object Extensions and Polyfills

In addition to the functionality provided by the underscore object many existing JavaScript objects are extended. Partly to provide ECMASCript 262-5 functionality. In addition some non-standard but useful methods are added to fill in some 'gaps' in what JavaScript provides.

In the future further ECMAScript polyfills may be added. Many of these polyfills are needed as recently as IE 11!

Other Polyfills

The document object will have document.head added to it if the browser does not provide this reference natively.

JSON is also partly implemented in the form of JSON.parse and JSON.stringify. Beware that the parser is a simple eval() fallback, so use with caution.

performance is partly polyfilled in the form of performance.now. No other aspects of it have been fixed.

Window.requestAnimationFrame and Window.cancelAnimationFrame are both polyfilled to use the browser specific versions if available, and otherwise to fall back upon setInterval. Just beware that in a lot of browsers setInterval maxes out at around 30fps, so keep an eye on that timer value your frame will be fed!

The implementations for both performance and Window.requestAnimationFrame is a stripped down rewrite of one Erik Möller had up on his "My Opera" page, but since "My Opera" has gone the way of the dodo, I can't link to it anymore.

More Information