Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
adding the css method
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonLoir committed Oct 14, 2017
1 parent f284aa1 commit 6f3e905
Show file tree
Hide file tree
Showing 2 changed files with 334 additions and 312 deletions.
73 changes: 36 additions & 37 deletions extjs-old.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
function EXTJS_MAIN(element){

this.css = function (prop, value) {
if (value != undefined) {
this.dom.style[prop] = value;
}else{
return this.dom.style[prop];
}
}

this.child = function(element_type){
var elem = document.createElement(element_type);
this.node.appendChild(elem);
//console.log($(elem));
return $(elem);
}

this.attr = function (attr_name, attr_value) {

if (attr_name != undefined) {

if (attr_value != undefined) {

this.node.setAttribute(attr_name, attr_value);
return $(this);

}else{

return this.node.getAttribute(attr_name);

}

}else{
console.error('Fatal error');
}

}

return this;
this.css = function (prop, value) {
if (value != undefined) {
this.dom.style[prop] = value;
}else{
return this.dom.style[prop];
}
}

this.child = function(element_type){
var elem = document.createElement(element_type);
this.node.appendChild(elem);
return $(elem);
}

this.attr = function (attr_name, attr_value) {

if (attr_name != undefined) {

if (attr_value != undefined) {

this.node.setAttribute(attr_name, attr_value);
return $(this);

}else{

return this.node.getAttribute(attr_name);

}

}else{
console.error('Fatal error');
}

}

return this;
}
Loading

0 comments on commit 6f3e905

Please sign in to comment.