@postnord/pn-marketweb-components 2.0.6-beta8 → 2.0.6-beta9
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/package.json
CHANGED
|
@@ -4,17 +4,31 @@
|
|
|
4
4
|
return;
|
|
5
5
|
}
|
|
6
6
|
document.body.dataset["marketwebComponentsSalesforceInit"] = true;
|
|
7
|
+
|
|
8
|
+
const header = document.createElement('pn-marketweb-header');
|
|
9
|
+
const footer = document.createElement('pn-marketweb-footer');
|
|
10
|
+
|
|
11
|
+
[header, footer].forEach((comp) => {
|
|
12
|
+
comp.setAttribute('market', 'dk');
|
|
13
|
+
comp.setAttribute('language', 'da');
|
|
14
|
+
})
|
|
15
|
+
document.body.insertBefore(header, document.body.firstElementChild);
|
|
16
|
+
document.body.appendChild(footer);
|
|
17
|
+
|
|
7
18
|
|
|
8
19
|
const s = document.createElement('script');
|
|
9
20
|
s.setAttribute("type", "module");
|
|
10
|
-
s.setAttribute("src", "https://unpkg.com/@postnord/pn-marketweb-components@2.0.6-
|
|
21
|
+
s.setAttribute("src", "https://unpkg.com/@postnord/pn-marketweb-components@2.0.6-beta9/umd/standalone-loader-salesforce.js");
|
|
11
22
|
document.querySelector("head").appendChild(s);
|
|
12
23
|
|
|
24
|
+
|
|
25
|
+
|
|
13
26
|
const unlockScripts = function() {
|
|
14
27
|
const blockedScripts = [...document.querySelectorAll('[data-locker-src]:not([src])')];
|
|
15
28
|
if (blockedScripts && blockedScripts.length > 0) {
|
|
16
29
|
blockedScripts.forEach((item) => {
|
|
17
30
|
item.setAttribute('src', item.getAttribute('data-locker-src'))
|
|
31
|
+
console.log('attempt to let this script load', item)
|
|
18
32
|
});
|
|
19
33
|
window.clearInterval(window["marketwebComponentsSalesforce-timer"]);
|
|
20
34
|
}
|
|
@@ -13,22 +13,11 @@ import { defineCustomElements } from './modules/@postnord/web-components/esm-es5
|
|
|
13
13
|
window['marketweb-components'] = {};
|
|
14
14
|
window['marketweb-components']['defineCustomElementsMarketWeb'] = defineCustomElementsMarketWeb;
|
|
15
15
|
window['marketweb-components']['defineCustomElements'] = defineCustomElements;
|
|
16
|
-
console.log("window['marketweb-components']", window['marketweb-components'])
|
|
17
16
|
(function(){
|
|
18
|
-
if (typeof
|
|
17
|
+
if (typeof window['marketweb-components'] === "undefined") {
|
|
19
18
|
return
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
const header = document.createElement('pn-marketweb-header');
|
|
23
|
-
const footer = document.createElement('pn-marketweb-footer');
|
|
24
|
-
|
|
25
|
-
[header, footer].forEach((comp) => {
|
|
26
|
-
comp.setAttribute('market', 'dk');
|
|
27
|
-
comp.setAttribute('language', 'da');
|
|
28
|
-
})
|
|
29
|
-
document.body.insertBefore(header, document.body.firstElementChild);
|
|
30
|
-
document.body.appendChild(footer);
|
|
31
|
-
|
|
32
21
|
window['marketweb-components']['defineCustomElements'](window, { resourcesUrl: '/scripts/' });
|
|
33
22
|
window['marketweb-components']['defineCustomElementsMarketWeb'](window, { resourcesUrl: '/scripts/' });
|
|
34
23
|
})();
|