h5o is an implementation of the HTML5 outline algorithm.

In your browser

Javascript library

npm install h5o

var HTML5Outline = require("h5o");
var outline = HTML5Outline(document.body);
console.log(outline.asHTML());

More details in the readme.

Build Status Supported: io.js Supported: node v0.10 Supported: node v0.12

Supported: phantom.js v1.9 Supported: jsdom v3.x Supported: jsdom v4.x

Sauce Test Status