Re: [dom] DOMTokenList hook to validate added token is in a supported set of keywords (#103)

The feature detection story is basically:
```
    var link = document.createElement("link");
    if (link.relList && link.relList.add("preload")) {
        // supported, since add() returned true
    } else {
        // Not supported. One of three options:
        // * relList not implemented
        // * add() returned "undefined", since this spec change wasn't yet implemented
        // * add() returned "false" since "preload" is not a valid token
    }
```

The above example refers to `<link>`, but the story is similar for `<iframe>`.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/103#issuecomment-153755263

Received on Wednesday, 4 November 2015 15:05:38 UTC