Skip to content

Instantly share code, notes, and snippets.

View desjardinsm's full-sized avatar

Matthew Desjardins desjardinsm

View GitHub Profile
@krmgns
krmgns / Element.prototype.classList.js
Last active October 28, 2020 01:25
Polyfill: Element.prototype.classList for IE8/9, Safari.
/**
* Element.prototype.classList for IE8/9, Safari.
* @author Kerem Güneş <[email protected]>
* @copyright Released under the MIT License <https://opensource.org/licenses/MIT>
* @version 1.2
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/classList
*/
;(function() {
// Helpers.
var trim = function(s) {