UNPKG

domtokenlist-shim

Version:

A super strict shim/polyfill for DOMTokenList

14 lines (11 loc) 312 B
;typeof window !== 'undefined' && (function () { 'use strict'; if ('classList' in document.createElement('a')) { return; } Object.defineProperty(Element.prototype, 'classList', { get: function () { return new DOMTokenList(this, 'className'); } }); }());