minor changes

This commit is contained in:
coderaiser 2012-08-10 08:15:40 -04:00
parent cde1665d3f
commit 882c574679
2 changed files with 10 additions and 12 deletions

View file

@ -24,7 +24,7 @@ scroll to needed place.
* Fixed bug with Array.isArray and getElementsByClassName in IE.
* Fixed bug with document.head and document.body in IE.
* Fixed bug with document.head in IE.
2012.08.06, Version 0.1.5

View file

@ -122,11 +122,7 @@ var PolyFills = {
setDocumentHead : (function(){
document.head = document.getElementsByTagName("head")[0];
}),
setDocumentBody : (function(){
document.body = document.getElementsByTagName("body")[0];
}),
getElementsByClassName: (function(pFunc){
var lThis = this;
@ -149,7 +145,6 @@ var PolyFills = {
* doucment.body
*/
lThis.setDocumentHead();
lThis.setDocumentBody();
if(typeof pFunc === 'function')
pFunc();
@ -161,8 +156,7 @@ var PolyFills = {
return window.jQuery('.'+pClassName)[0];
};
lThis.setDocumentHead();
lThis.setDocumentBody();
lThis.setDocumentHead();
if(typeof pFunc === 'function')
pFunc();
@ -316,10 +310,14 @@ CloudClient.Util = (function(){
/* если js-файл уже загружен
* запускаем функцию onload
*/
else if(lFunc && typeof lFunc==='function'){
try{
else if(lFunc){
if(typeof lFunc === 'function')
lFunc();
}catch(error){console.log(error);}
else if(typeof lFunc === 'object' &&
typeof lFunc.onload === 'function')
lFunc.onload();
}
return element;
},