function loadScript(body, script, readyCallback){
    var scriptElement = document.createElement("script");
    scriptElement.src = script;

    // IE
    if(scriptElement.readyState){
        scriptElement.onreadystatechange = function(){
            if (script.readyState === "loaded" || script.readyState === "complete"){
                script.onreadystatechange = null;
                readyCallback();
            }
        };
    } else {
        scriptElement.onload = readyCallback;
    }

    body.appendChild(scriptElement);
}
/**
 * TODO: solve blocking download
 *
 * add js dynamically
 *
 * @param body
 * @param script
 * @param readyCallback  when download successfully to callback, to solve the problem of dependent js through blocking download.
 */
solve blocking download
add js dynamically

@param body
@param script
@param readyCallback  when download successfully to callback, to solve the problem of dependent js through blocking download.
solve blocking download add js dynamically @param body @param script @param readyCallback when download successfully to callback to solve the problem of dependent js through blocking download .
function loadScript(body, script, readyCallback){
    var scriptElement = document.createElement("script");
    scriptElement.src = script;
    if(scriptElement.readyState){
        scriptElement.onreadystatechange = function(){
            if (script.readyState === "loaded" || script.readyState === "complete"){
                script.onreadystatechange = null;
                readyCallback();
            }
        };
    } else {
        scriptElement.onload = readyCallback;
    }
    body.appendChild(scriptElement);
}
function loadScript ( body , script , readyCallback ) { var scriptElement = document . createElement ( "script" ) ; scriptElement . src = script ; if ( scriptElement . readyState ) { scriptElement . onreadystatechange = function ( ) { if ( script . readyState === "loaded" || script . readyState === "complete" ) { script . onreadystatechange = null ; readyCallback ( ) ; } } ; } else { scriptElement . onload = readyCallback ; } body . appendChild ( scriptElement ) ; }
TODO: solve blocking download
 add js dynamically
TODO : solve blocking download add js dynamically
// IE