web-manager 3.1.8 → 3.1.9
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.
- package/lib/dom.js +7 -3
- package/package.json +1 -1
package/lib/dom.js
CHANGED
@@ -254,9 +254,13 @@ Dom.loadScript = function(options, callback) {
|
|
254
254
|
options = options || {};
|
255
255
|
options.async = typeof options.async === 'undefined' ? false : options.async;
|
256
256
|
options.crossorigin = typeof options.crossorigin === 'undefined' ? false : options.crossorigin;
|
257
|
-
options.
|
258
|
-
|
259
|
-
|
257
|
+
options.cacheBreaker = typeof options.cacheBreaker === 'undefined' ? true : options.cacheBreaker;
|
258
|
+
|
259
|
+
if (options.cacheBreaker) {
|
260
|
+
options.src = new URL(options.src);
|
261
|
+
options.src.searchParams.set('cb', new Date().getTime());
|
262
|
+
options.src = options.src.toString();
|
263
|
+
}
|
260
264
|
|
261
265
|
var s = document.createElement('script');
|
262
266
|
s.src = options.src;
|
package/package.json
CHANGED