JavaScript and DOM Compatibility

With the increasing popularity of advanced JavaScript techniques on the web (variously called web 2.0, AJAX or DHTML), we’ve decided to make a big push for JavaScript and DOM compatibility. And hey, this stuff is useful for a lot of web 1.0 sites as well. (Can you tell I’m not a fan of these buzzwords?)

We’re testing against a number of test suites, including the JavaScript test suite from Mozilla and several DOM test suites from the W3C. We won’t obsolete any time soon. And we are also working to support nonstandard “DOM Level 0” features and Firefox and mozilla quirks. But we’re making a lot of progress on this standards stuff too.

Here’s a quick update on where we stand, with the latest cvs version of WebKit:


Mozilla JavaScript tests 1111 total 1018 passed 91.63% success

DOM (in HTML pages)

DOM Level 1 Core (html) 238 total 226 passed 95.0% success
DOM Level 2 Core (html) 11 total (1) 11 passed 100% success
DOM Level 2 Events (html) 26 total 26 passed 100% success
DOM Level 2 HTML (html) 685 total 680 passed 99.3% success

DOM (in XHTML pages)

Note, this section applies only to XHTML pages served with an XHTML mime type. This doesn’t apply to most XHTML pages on the web today. But we’d to be forward-looking and so we’re doing our best to make XHTML and XML work really well in the WebKit engine.

DOM Level 1 Core 238 total 212 passed 89.1% success
DOM Level 2 Core 11 total (1) 7 passed 63.8% success
DOM Level 2 Events (xhtml) 26 total 26 passed 100% success
DOM Level 2 HTML (xhtml) 687 total 597 passed 86.9% success
DOM Level 3 Core (xhtml) (2) 708 total 78 passed 11.0% success

In closing, I’d like to add that even though we’re not yet passing all the DOM test suites, on many we are actually doing better than most other browsers, and we’re actively working to do even better.

1: A lot of the DOM Level 2 Core tests are not available in HTML standalone versions yet – we’re working with the W3 Consorium’s QA working group on this.
2: DOM Level 3 support is completely experimental – we haven’t really made a full-on attempt to work on it yet.