mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-23 13:12:42 +01:00
Replaced append by prepend
This commit is contained in:
@@ -21,18 +21,19 @@
|
||||
this.viewElement = viewElement;
|
||||
},
|
||||
detachView: function() {
|
||||
this.viewElement == null;
|
||||
this.viewElement = null;
|
||||
},
|
||||
clear: function (){
|
||||
this.viewElement.innerHTML = '';
|
||||
},
|
||||
insert: function (htmlElement) {
|
||||
if(this.viewElement.childNodes.length == 0) {
|
||||
this.viewElement.appendChild(htmlElement);
|
||||
var vw = this.viewElement;
|
||||
if(vw.childNodes.length == 0) {
|
||||
vw.appendChild(htmlElement);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.viewElement.appendChild(htmlElement);
|
||||
vw.insertBefore(htmlElement, vw.childNodes[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user