cheeriojs/cheerio — pull request #561 by jugglinmike (2014-09-18 00:07:11+00:00)
Title: Expose DOM level 1 API for Node-like objects

Now that [Cheerio preserves parsing options](https://github.com/cheeriojs/cheerio/pull/437), we can use [the `withDomLvl1` option in htmlparser2's default `DomHandler`](https://github.com/fb55/domhandler/commit/3a70221fdb29ca12b6320a7bcac3d3afa42bb923) (which we prototyped in gh-308) to expose a standard API for the Node-like objects that Cheerio builds.

I've updated the tests and documentation to demonstrate this usage, but I've left the internals untouched. Because the new API is defined via ES5 "getters", it will be slightly more efficient to use the original, non-standard API internally. If anyone thinks that this could cause more confusion than its worth (probably justified via our benchmarks), I'd be happy to update the internals as well.

Commit message:

> Now that htmlparser2's default DomHandler supports the `withDomLvl1`
> option, enable it by default for all parsed content.
>
> Update the project documentation and tests to use this standard API to
> exemplify usage.