Re: [dom] Added an example showing feature detection with supports() (#144)

> @@ -8724,6 +8724,20 @@ associated <a for="/">element</a>'s
>    <p>Throws a <code>TypeError</code> exception if the associated attribute has no supported tokens defined.
>  </dl>
>  
> +<p>The <a method for=DOMTokenList lt="supports()">supports()</a> method can be used to detect support for {{DOMTokenList}} tokens:
> +
> +<pre class=lang-javascript>
> +function domTokenListSupports(tokenList, token) {
> +    if (!tokenList || !tokenList.supports) {
> +        return;
> +    }
> +    return tokenList.supports(token);
> +};

removed

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/144/files#r49557430

Received on Wednesday, 13 January 2016 07:12:51 UTC