Thursday, June 18th, 2009
JavaScript Compatibility Tests
Robert Nyman has setup a really nice test suite for JavaScript 1.6, 1.7, and 1.8+ features such as getters/setters, Object.defineProperty, Object.getPrototypeOf, new String extras, and JSON.
It includes compatibility tables, and will try to run the tests on your browser to give you feedback. It also includes sample code to check web browser support that you can use in your own projects.
- Introduction to the tests
- Demos of getter and setters in JavaScript
- JavaScript 1.8.1 tests
- Native JSON tests
Nice job Robert!





No Opera versions correctly support destructuring (though the table claims otherwise). The most Opera supports is
[a,b] = [b,a]
and not much more.To be considered supporting destructuring, this last line of this code should be true:
function foo({a, b:c, d:[e, f]}, [g, h], [{i:j}]) {
return a+c+e+f+g+h+j;
};
foo({a:1, b:2, d:[3, 4]}, [5, 6], [{i:7}]) === 28
Hi,
I’m Robert, author of the tests. Eli, you are correct. Opera only has partial destructuring support and I will add that information to my tests.
Thank you!