Mark Nottingham wrote:
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
While this is a neat idea in theory, but is fairly useless in practice.
How many times have you used the similar function 'hasFeature'?
Hopefully pretty much all implementations will very soon pass the full
test suite. If not we have probably written a too complicated spec.
The above methods don't actually even solve the problem you brought up,
the ability to know if a certain http-method is supported. If we really
want that we could add a 'supportsMethod' function or similar.
/ Jonas