Latest Version: 3.5 PRODUCTION 25 January 2018

VERSION 3.5 PRODUCTION, 25 January 2018
3.2+ brings new functionality to the _.make, polyfills for some more ECMASCript stuff in Number and Math, extensions to String, and continuing bugfixes and optimization.

elementals.js is a function library for JavaScript. I prefer not to call it a "framework" as it doesn't try to change how JavaScript works, it simply enhances the existing way of doing things and fills in what I consider to be some obvious 'blanks' in the specification. The new helper functions are provided through an object named "_" (yes, just an underscore character), and there are shim/polyfill to it to allow the use of some ECMAScript methods on strings and arrays for browsers that don't support them as yet.

Really most of the existing "frameworks" are WAY too massive to have any business on a normal website. Many of them by themselves gZip COMPRESSED are half the size I usually allow for an entire page template's HTML + CSS + scripts + images; yet amazingly their massive bloat is BEFORE you actually even start adding USEFUL scripting that actually does stuff to the page. In addition, they are quite often chock full of functions that most people would never use, outright abuse, are CSS' job, or just plain don't belong on a website!


  1. Maximum download size targets once gzipped of 12k for the complete source (currently 11.06k), and 8k or less gzipped when both minification and gzip compression is applied. (currently 7.49k)
  2. Designed for inclusion before </body>, speeding load time.
  3. Encourages the use of scripts that attach themselves rather than called by the attributes in the markup or inlining scripting in the document.
  4. Provide shims in legacy browsers for missing ECMAScript functions like String.trim or Array.indexOf.
  5. Cross-browser AJAX object creation that allows passing a series of 'readystate' and 'status' handlers.
  6. uSort style method for Lists and Tables.
  7. DOM walking tools like various 'each', 'next' and 'prev' methods, that can be passed a 'mask' for either specific tags, or nodetypes.
  8. Class handling methods akin to those in the new Element.classList property, but with more consistent naming conventions, not quite so buried in an element's properties, and with a few extra bells and whistles. Laughably it turns out the regEx I made for backwards compatibility in older browsers runs faster than the actual ECMAScript style methods... I suspect this is because they actually use the classList Array, and Arrays/indexed objects are painfully slow in JavaScript.

For the time being news and announcements will be posted over on our sister site:
CutCodeDown - Minimalist Semantic Markup.



Current file sizes for elementals.js
Raw Size: 41370 bytes
Minified: 21600 bytes
Raw gZip: 11329 bytes
Minified gZip: 7670 bytes