I'm wondering if it would be useful to have some optional flags in implementations that developers can use to test for. While many JS features can be tested for by testing a property, this isn't so for XHR; e.g., you can't easily test to see if it supports more than GET and POST, for example, or if the cache is correctly implemented.

For example, we could specify a tree of properties on the navigator object that are tied to passing the test suite; authors could use that to figure out if certain features are supported. E.g.,

navigator.w3c.xhr.full  // passes the full test suite
navigator.w3c.xhr.core // passes all of the MUST-level requirements in XHR
navigator.w3c.xhr.cache // passes all HTTP caching-related tests
navigator.w3c.xhr.redirect // passes all HTTP redirect-related tests

There are many ways that this could be done, of course; that's just an example.

The biggest downside I can see is that a vendor might not correctly set them (through accident or maliciously). However, even in that case, it's a lot easier for authors to test for the property and then make an exception or two, rather than test every browser and maintain a whitelist in code.

--
Mark Nottingham
[EMAIL PROTECTED]




Reply via email to