gd-sprest 8.0.6 → 8.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,23 +9,30 @@ exports.loadSPCore = function () {
9
9
  return new Promise(function (resolve) {
10
10
  // Define the core libraries to load
11
11
  var libs = ["init", "MicrosoftAjax", "SP.Runtime", "SP"];
12
- // Parse the libraries
13
- for (var i = 0; i < libs.length; i++) {
12
+ var _loop_1 = function (i) {
14
13
  var libName = libs[i];
15
14
  // See if a script already exists
16
15
  if (document.querySelector("script[title='" + libName + "']") == null) {
17
16
  // Log
18
17
  console.debug("[gd-sprest] Loading the core library: " + libName);
19
- // Load the library
20
- var elScript = document.createElement("script");
21
- elScript.title = libName;
22
- elScript.src = document.location.origin + "/_layouts/15/" + libName + ".js";
23
- document.head.appendChild(elScript);
18
+ // Create the script element to load the library
19
+ var elScript_1 = document.createElement("script");
20
+ elScript_1.title = libName;
21
+ elScript_1.src = document.location.origin + "/_layouts/15/" + libName + ".js";
22
+ // Wait for the previous library to load
23
+ setTimeout(function () {
24
+ // Load the script
25
+ document.head.appendChild(elScript_1);
26
+ }, 10 * i);
24
27
  }
25
28
  else {
26
29
  // Log
27
30
  console.debug("[gd-sprest] Core library already loaded: " + libName);
28
31
  }
32
+ };
33
+ // Parse the libraries
34
+ for (var i = 0; i < libs.length; i++) {
35
+ _loop_1(i);
29
36
  }
30
37
  // Resolve the request
31
38
  resolve();
package/build/rest.js CHANGED
@@ -9,7 +9,7 @@ var sptypes_1 = require("./sptypes");
9
9
  * SharePoint REST Library
10
10
  */
11
11
  exports.$REST = {
12
- __ver: 8.06,
12
+ __ver: 8.07,
13
13
  AppContext: function (siteUrl) { return Lib.Site.getAppContext(siteUrl); },
14
14
  Apps: Lib.Apps,
15
15
  ContextInfo: Lib.ContextInfo,