@posiwise/common-services 0.1.93 → 0.1.94

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.
@@ -36,16 +36,6 @@ class ScriptLoaderService {
36
36
  this.document = document;
37
37
  this._scripts = {};
38
38
  }
39
- getCspNonce() {
40
- // Prefer explicit global set by server-side renderer
41
- const w = globalThis;
42
- if (w?.__cspNonce)
43
- return w.__cspNonce;
44
- // Fallback: try to read nonce from any existing script tag
45
- const anyScript = this.document.querySelector('script[nonce]');
46
- const n = anyScript?.nonce || anyScript?.getAttribute('nonce') || undefined;
47
- return n || undefined;
48
- }
49
39
  load(tag, ...scripts) {
50
40
  scripts.forEach((src) => {
51
41
  if (!this._scripts[src]) {
@@ -83,9 +73,6 @@ class ScriptLoaderService {
83
73
  const scriptTag = document.createElement('script');
84
74
  scriptTag.type = 'text/javascript';
85
75
  scriptTag.src = this._scripts[src].src;
86
- const nonce = this.getCspNonce();
87
- if (nonce)
88
- scriptTag.nonce = nonce;
89
76
  scriptTag.onload = () => {
90
77
  this._scripts[src].loaded = true;
91
78
  resolve({ src, loaded: true });