tmpvar/jsdom — pull request #387 by lbdremy (2012-01-17 12:02:31+00:00)
Title: Catch HIERARCHY_REQUEST_ERR type error

Hello guys,
First thanks for your awesome job on jsdom.

This pull request contains a test for the issue #319 that is similar to #290 and a fix for this same issue.

In the file lib/jsdom/browser/htmltodom.js at line 173 I added a try/catch to catch eventual HIERARCHY_REQUEST_ERR thrown by the function appendChild().
To report the error if an error is catched,(I'm not quite sure if I'm doing right) I imitated the way that errors are handled above.