[whatwg] hasFeature() When Only 1 Syntax is Supported

Smylers Smylers at stripey.com
Sat Jun 20 09:34:38 PDT 2009


The current text suggests that a user-agent may choose to support only
the HTML syntax (not XHTML) but should still return true for
hasFeature("XHTML", "5.0").

If that isn't intended then the requirements for hasFeature() should be
changed to depend on the syntaxes chosen to be implemented.  If it _is_
intended (and given various things browsers have to do for web
compatibility, it wouldn't surprise me) then perhaps it would be better
to spell this out explicitly, since it's counter-intuitive.

hasFeature() currently has the implementation requirements:

  User agents should respond with a true value when the hasFeature
  method is queried with these values.

    -- http://www.whatwg.org/html5#dom-feature-strings:

Where "these values" are ("HTML", "5.0") and ("XHTML", "5.0").

However while supporting both HTML and XHTML is "encouraged",
user-agents "may" choose to support only one of them:

  http://www.whatwg.org/html5#conformance-requirements

Smylers



More information about the whatwg mailing list