mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
fixed bug with uninitialized function in anyload
This commit is contained in:
parent
5552c70d48
commit
386ac995f7
1 changed files with 8 additions and 7 deletions
15
client.js
15
client.js
|
|
@ -588,13 +588,14 @@ CloudClient._anyload = function(pName,pSrc,pFunc,pStyle,pId,pElement)
|
|||
/* if passed arguments function
|
||||
* then it's onload by default
|
||||
*/
|
||||
if(typeof pFunc === 'function'){
|
||||
element.onload=pFunc;
|
||||
/* if object - then onload or onerror */
|
||||
}else if (typeof pFunc === 'object'){
|
||||
if(pFunc.onload)element.onload = pFunc.onload;
|
||||
if(pFunc.onerror)element.onerror=pFunc.onerror;
|
||||
}
|
||||
if(pFunc)
|
||||
if(typeof pFunc === 'function'){
|
||||
element.onload=pFunc;
|
||||
/* if object - then onload or onerror */
|
||||
}else if (typeof pFunc === 'object'){
|
||||
if(pFunc.onload)element.onload = pFunc.onload;
|
||||
if(pFunc.onerror)element.onerror=pFunc.onerror;
|
||||
}
|
||||
if(arguments.length>=4){
|
||||
element.style.cssText=pStyle;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue