Further conversion to new pattern.

This commit is contained in:
Michael Jumper
2012-11-12 01:09:52 -08:00
parent 38dfc3128a
commit 3f02525a2c
5 changed files with 113 additions and 50 deletions

View File

@@ -18,6 +18,21 @@
var GuacUI = GuacUI || {};
/**
* Creates a new element having the given tagname and CSS class.
*/
GuacUI.createElement = function(tagname, classname) {
var new_element = document.createElement(tagname);
new_element.className = classname;
return new_element;
};
GuacUI.createChildElement = function(parent, tagname, classname) {
var element = GuacUI.createElement(tagname, classname);
parent.appendChild(element);
return element;
};
/**
* Central registry of all components for all states.
*/