Hosted by Three Crickets

Web Framework
For Prudence and MongoDB

Diligence is still under development and incomplete, and some this documentation is wrong. For a more comprehensive but experimental version download the Savory Framework, which was the preview release of Diligence.

Diligence logo: sleeping monkey

HTML Service

This service supports two uses:
  1. Generating structured, internationalized, sanitized HTML code.
  2. Consuming HTML and parsing it using a jQuery-like syntax. For this we rely internally on the jsoup library.


Make sure to check out the API documentation for Diligence.HTML. Also useful is the API documentation for Sincerity.XML.


The most general API is "build", which accepts a JSON structure and turns it into HTML:
	_tag: 'div',
	_children: [
The generated HTML is:
All text is properly escaped as appropriate for HTML content and HTML tag attributes. Note that keys beginning with "_" are treated specially, as explained below.
The library also contains shortcuts for simple HTML elements, like so:
<%= Diligence.HTML.img({src: ''}) %>
Special Attributes

Parsing HTML

Other Utilities


The Diligence Manual is provided for you under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. The complete manual is available for download as a PDF.

Download manual as PDF Creative Commons License