Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 52 lines (30 sloc) 3.243 kb

Mission

jsdom is, as said in our tagline, “A JavaScript implementation of the W3C DOM.” Anything that helps us be better at that is welcome.

Status

We're pretty happy with our DOM2 implementation, modulo bugs. DOM3 is nowhere near complete, and DOM4 is almost nonexistant.

Existing Tests

The DOM, thankfully, has lots of tests already out there. Those already included in the repository are of two types:

  • Auto-generated or adapted from existing W3C tests.
  • Written by contributors to plug gaps in the W3C tests.

Of these, of course, the first is preferable. When we find gaps, we usually add the tests at the bottom of the relevant auto-generated test suite, e.g. in test/level2/html.js.

Not all of the existing tests pass. The current test compliance is tracked in the README.

Contributing

When contributing, the first question you should ask is:

Can I exhibit how the browsers differ from what jsdom is doing?

If you can, then you've almost certainly found a bug in or missing feature of jsdom, and we'd love to have your contribution. In that case, move on to:

What W3C spec covers this potential contribution?

Some likely ones include:

Once you have those nailed down, you'll want to ask:

Where can I get a W3C test for this functionality?

We already have all the DOM1 and DOM2 tests. We even have some DOM3 ones, although sadly they are currently disabled, due to DOM3 not being complete. (Maybe you could help break them out into complete vs. work in progress?)

DOM4 has no officially-finished, but many tests are found on w3c-test.org. Check in a few different directories, e.g. html and webapps, or perhaps browse through the nice test runner interface. If you really can't find anything, you can always ask public-webapps-testsuite@w3.org, like I did.

If there is no W3C test covering the functionality you're after, then you can write your own, placing it in the appropriate level. But in this case you'll probably want to alert the authors of the relevant test suite that they missed something!

Issues

Finally, we have an active and full issue tracker that we'd love you to help with. Go find something broken, and fix it!

Something went wrong with that request. Please try again.