Skip to content

Commit

Permalink
Add README entry about jsdom-devtools-formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
viddo authored and domenic committed Apr 1, 2018
1 parent c520198 commit 70ec93b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -393,6 +393,12 @@ Notably, jsdom works well inside a web worker. The original contributor, [@lawns

Not everything works perfectly when running jsdom inside a web browser. Sometimes that is because of fundamental limitations (such as not having filesystem access), but sometimes it is simply because we haven't spent enough time making the appropriate small tweaks. Bug reports are certainly welcome.

### Debugging the DOM using Chrome Devtools

As of Node.js v6 you can debug programs using Chrome Devtools. See the [official documentation](https://nodejs.org/en/docs/inspector/) for how to get started.

By default jsdom elements are formatted as plain old JS objects in the console. To make it easier to debug, you can use [jsdom-devtools-formatter](https://github.com/viddo/jsdom-devtools-formatter), which lets you inspect them like real DOM elements.

## Caveats

### Asynchronous script loading
Expand Down

0 comments on commit 70ec93b

Please sign in to comment.