tests/Leaflet/sl-application.js
/**
 * Loads the script with the given URL by adding a script tag to the document.
 *
 * @private
 * @param {string} scriptURL the script to load
 * @param {function} onLoadHandler a callback to call when the script is loaded (optional)
 */
Loads the script with the given URL by adding a script tag to the document.
@private
@param {string} scriptURL the script to load
@param {function} onLoadHandler a callback to call when the script is loaded (optional)
Loads the script with the given URL by adding a script tag to the document . @private @param { string } scriptURL the script to load @param { function } onLoadHandler a callback to call when the script is loaded ( optional )
function slAddDynamicScript(scriptURL, onLoadHandler)
{
    var script = document.createElement('script');
    script.src = scriptURL;
    script.type = "text/javascript";
    if (onLoadHandler) {
        script.onreadystatechange = function () {
            if (script.readyState == 'complete' || script.readyState == 'loaded') {
                onLoadHandler();
            }
        }
        script.onload = onLoadHandler;
    }
    document.body.appendChild(script);
}
function slAddDynamicScript ( scriptURL , onLoadHandler ) { var script = document . createElement ( 'script' ) ; script . src = scriptURL ; script . type = "text/javascript" ; if ( onLoadHandler ) { script . onreadystatechange = function ( ) { if ( script . readyState == 'complete' || script . readyState == 'loaded' ) { onLoadHandler ( ) ; } } script . onload = onLoadHandler ; } document . body . appendChild ( script ) ; }
Loads the script with the given URL by adding a script tag to the document.
Loads the script with the given URL by adding a script tag to the document .
// Need to use ready state change for IE as it doesn't support onload for scripts // Standard onload for Firefox/Safari/Opera etc