Only a very minor comment: can we not store off `element.getAttribute('data-class')` so it's cached (rather than touching the element twice). For example...

```js
var elementClassName = element.getAttribute('data-class');
gif.className = (elementClassName ? elementClassName + ' ' : '') + this.className;
```