2.0.1 • Published 7 years ago

lonesomedom v2.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

NPM version

Lonesome dom

Generate a standalone, portable, offline capable version of any DOM.

  • CSS rules are extracted & injected (only for used rules, using microcss)
  • Images are inlined using dataURL

Use with browserify for a client side usage

Motivation

  • You need to print actual page rendering (as PDF/image)
  • You know that Gecko & webkit are rendering engine, you do NOT want to write/use another custom/homemade DOM rendering engine, (see https://github.com/niklasvh/html2canvas/blob/master/src/nodecontainer.js).
  • You work with simple page app / complex website, there is no "URL" to provide to a server side tool, use lonesomedom & transfert a "private/dynamic dom" without any dependency !

API

  var lonesomedom = require('lonesomedom');

lonesomedom.process(anchor, function(err, simpleDom) {
  console.log(simpleDom.outerHTML);
});

Todo

  • Expose ucss options
  • Anti-aliasing in image inlining
  • Strip inline js/scripts (?)
2.0.1

7 years ago

2.0.0

7 years ago

1.2.5

8 years ago

1.2.4

8 years ago

1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago