html.js

html.js

An intuitive, extensible way to work directly with the DOM.

html.js is a fork of voyeur.js that has made it more simpler to deal with DOM in a relatively new way.

It has a pretty extensive API and you could also create your own plugins HTML._.fn.name = function;

Get it: npm install --save html.js

Usage Example:

1
2
3
4
5
6
7
8
9
10
let HTML = require('html.js');

HTML.body.header; // returns header element.

HTML.query("#example").h1.em; // chain on, man.

if (!('each' in node)) {
  HTML.ify(node);
}
node.each(function(el){ console.log(el, ' is your friend!'); });

GIF FTW!

html.js

Thanks to Nathan Bubna for this module.

Suggest a module

Comments