Sha256: 5a2708c44b63aecb90497d2d9876a38c012740f46b551dca5f42b4c78b77e605
Contents?: true
Size: 1.88 KB
Versions: 3
Compression:
Stored size: 1.88 KB
Contents
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2018 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ /* * IMPORTANT: This is a private module, its API must not be used and is subject to change. * Code other than the Core tests must not yet introduce dependencies to this module. */ /*global document, sap */ (function() { "use strict"; //extract base URL from script tag var oScriptTag, mMatch, sBaseUrl; oScriptTag = document.getElementById("sap-ui-bootstrap"); if (oScriptTag) { mMatch = /^(?:.*\/)?resources\//.exec(oScriptTag.getAttribute("src")); if (mMatch) { sBaseUrl = mMatch[0]; } } if (sBaseUrl == null) { throw new Error("sap-ui-boot.js: could not identify script tag!"); } function loadScripts(urls, callback) { var pending = urls.length, errors = 0; function listener(e) { pending--; if ( e.type === 'error' ) { errors++; } e.target.removeEventListener("load", listener); e.target.removeEventListener("error", listener); if ( pending === 0 && errors === 0 && callback ) { callback(); } } for ( var i = 0; i < urls.length; i++ ) { var script = document.createElement("script"); script.addEventListener("load", listener); script.addEventListener("error", listener); script.src = sBaseUrl + urls[i]; document.head.appendChild(script); } } // cascade 1: polyfills, can all be loaded in parallel loadScripts([ "sap/ui/thirdparty/baseuri.js", "sap/ui/thirdparty/es6-promise.js", "sap/ui/thirdparty/es6-string-methods.js", "sap/ui/thirdparty/es6-object-assign.js" ], function() { // cascade 2: the loader loadScripts([ "ui5loader.js" ], function() { // cascade 3: the loader configuration script sap.ui.loader.config({ async:true }); loadScripts([ "ui5loader-autoconfig.js" ]); }); }); }());
Version data entries
3 entries across 3 versions & 1 rubygems