A lot of the main implementation is in lib/jsdom/level1
and lib/jsdom/level2
. (That includes things that didn‘t appear in the original DOM Level 1 and Level 2 specs, just because the code was located there and we had to patch it.) We’re trying to avoid adding new code there, but patching old code is often still required.
New features generally go in the lib/jsdom/living
folder, in nice small files, with a clear coding style enforced by JSHint.
We're planning to fix this whole situation with a multi-stage process:
lib/jsdom/browser
and lib/jsdom/level3
, as well as the more substantial body of code in lib/jsdom/level2
, into lib/jsdom/level1
. This will contain the “historical” portion of the jsdom codebase.lib/jsdom/level1
and into lib/jsdom/living
, cleaning up the code style and spec compliance as we go.