Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tmpvar/jsdom
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpvar committed Feb 17, 2012
2 parents 00c75a1 + ce9501e commit a36c8ff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ or with raw javascript source
- `errors` : array of errors
- `window` : a brand new window

_example:_ jsdom.env(html, function(`errors`, `window`) {})
_example:_

jsdom.env(html, function(`errors`, `window`) {
// free memory associated with the window
window.close();
});

If you would like to specify a configuration object

Expand Down Expand Up @@ -135,7 +139,7 @@ If you want to spawn a document/window and specify all sorts of options this is


var jsdom = require('jsdom'),
doc = jsdom.jsdom('<html><body></body></html>', jsdom.dom.level1.core)
doc = jsdom.jsdom('<html><body></body></html>', jsdom.level(1, 'core'))

- `options` see the **Flexibility** section below

Expand Down Expand Up @@ -213,7 +217,7 @@ This feature is backed by [sizzle][] but currently causes problems with some lib

## Creating a document
var jsdom = require("jsdom"),
doc = new (jsdom.dom.level1.core.Document)();
doc = new (jsdom.level(1, 'core').Document)();
console.log(doc.nodeName);
// outputs: #document

Expand Down

0 comments on commit a36c8ff

Please sign in to comment.