This file contains hidden or 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
(function(global, document) { | |
'use strict'; | |
var namespace = 'y9'; | |
function el(selector, context) { | |
return (context || document).querySelector(selector); | |
} | |
function els(selector, context) { | |
return (context || document).querySelectorAll(selector); |
This file contains hidden or 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
(function(global, document){ | |
// @private | |
function getStyle(el, prop, pseudo) { | |
return window.getComputedStyle(el, pseudo)[prop]; | |
} | |
function setStyle(el, prop, value) { | |
return el.style[prop] = value; | |
} |
This file contains hidden or 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
(function(global){ | |
'use strict'; | |
var JSON = global.JSON; | |
// @private | |
function whatType(o) { | |
return Object.prototype.toString.call(o).slice(8,-1).toLowerCase(); | |
} |
This file contains hidden or 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
(function(global, document){ | |
'use strict'; | |
/* ----------------------------------------------------- | |
* DOM 선택 헬퍼 함수 */ | |
function els(selector, context) { | |
if (typeof selector !== 'string' || selector.trim().length === 0) { return null; } | |
context = !context ? document : context.nodeType === 1 ? context : el(String(context)); | |
return context.querySelectorAll(selector); |