Skip to content

New more low-level interface

Latest

Choose a tag to compare

@freeall freeall released this 20 Jun 11:57
· 2 commits to master since this release

The original idea of dombo was to be a thin wrapper on top of the native DOM. And it's now a reality.

$('.foo') now returns an array-like object that also has all the properties of the DOM objects it selected. E.g., both a div and an input element will have an innerHTML property, but only an input element will have a value property.

The returned element will also include all array methods like map/reduce/forEach/etc, the length property and you can index with [0].