Skip to content

Instantly share code, notes, and snippets.

View benqus's full-sized avatar
🛫

Bence Kormos benqus

🛫
View GitHub Profile
@benqus
benqus / UIElement
Last active October 10, 2015 12:38
[Experimental] Class that binds together a JavaScript object with a HTMLElement [ECMAScript5]
/**
* UIElement class
* @param [tagName] {String} the nodeName of the HTMLElement to bind to
* @param [ctx] {Function} this function will be called to decorate the new instance
*/
var UIElement = function (arg, ctx) {
var element,
context;
//only one argument given