[whatwg] hasFeature() When Only 1 Syntax is Supported
Ian Hickson
ian at hixie.ch
Mon Jul 13 22:44:25 PDT 2009
On Sat, 20 Jun 2009, Smylers wrote:
>
> 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
On Mon, 22 Jun 2009, Simon Pieters wrote:
>
> Maybe the spec should remove these feature strings altogether and
> encourage authors to use more accurate methods of detecting support.
On Wed, 24 Jun 2009, Simon Pieters wrote:
>
> The spec is now gaining all the remaining stuff from DOM2 HTML, so this
> note is incorrect:
>
> "Note: The interfaces defined in this specification are not always
> supersets of the interfaces defined in DOM2 HTML; some features that
> were formerly deprecated, poorly supported, rarely used or considered
> unnecessary have been removed. Therefore it is not guaranteed that an
> implementation that supports "HTML" "5.0" also supports "HTML" "2.0"."
>
> I'm thinking that the spec should maybe just use "2.0" instead of "5.0",
> since it's what browsers do and there might be pages that check for
> this.
>
> Meanwhile it seems useful to return false as appropriate if the UA only
> allows one of the syntaxes, as Smylers points out.
I've removed everything but HTML/2.0.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list