Seems like this could be simplified to avoid having to create an element. Why not just test the body element?

Also, since it's possible for a YUI instance to be attached to a document (such as an iframe) other than the document that's in the current global context, you need to use the stored reference `Y.config.doc` here instead of `document`. So this can be changed to:

```js
var _hasClassList = Y.config.doc && 'classList' in Y.config.doc.body;
```