This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var events = (function(){ | |
function addRemove(op, events, cb){ | |
if( cb ) | |
events.split(' ').forEach(name => { | |
var ev = name.split('.')[0] | |
cb = cb || this._eventsNS[name] | |
this[op + 'EventListener'].call(this, ev, cb) | |
if(op == 'add') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var domIsReady = (function(domIsReady) { | |
var isBrowserIeOrNot = function() { | |
return (!document.attachEvent || typeof document.attachEvent === "undefined" ? 'not-ie' : 'ie'); | |
} | |
domIsReady = function(callback) { | |
if(callback && typeof callback === 'function'){ | |
if(isBrowserIeOrNot() !== 'ie') { | |
document.addEventListener("DOMContentLoaded", function() { | |
return callback(); |