@blotoutio/edgetag-sdk-js 0.46.1 → 0.47.0

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.
Files changed (3) hide show
  1. package/index.cjs.js +12 -1
  2. package/index.mjs +12 -1
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -373,7 +373,7 @@ const getStandardPayload = (payload) => {
373
373
  referrer: getReferrer(),
374
374
  search: getSearch(),
375
375
  locale: getLocale(),
376
- sdkVersion: "0.46.1" ,
376
+ sdkVersion: "0.47.0" ,
377
377
  ...(payload || {}),
378
378
  };
379
379
  let storage = {};
@@ -839,6 +839,17 @@ const handleConsent = (consent, options) => {
839
839
  });
840
840
  }
841
841
  }
842
+ try {
843
+ window.dispatchEvent(new CustomEvent('edgetag-consent', {
844
+ detail: {
845
+ oldConsent: existingConsent,
846
+ newConsent: consent,
847
+ },
848
+ }));
849
+ }
850
+ catch {
851
+ // do nothing
852
+ }
842
853
  /* Calling Consent for all providers, not on instance level */
843
854
  for (const pkg of Object.values(providerPackages)) {
844
855
  if (!pkg || !pkg.name || !pkg.consent) {
package/index.mjs CHANGED
@@ -371,7 +371,7 @@ const getStandardPayload = (payload) => {
371
371
  referrer: getReferrer(),
372
372
  search: getSearch(),
373
373
  locale: getLocale(),
374
- sdkVersion: "0.46.1" ,
374
+ sdkVersion: "0.47.0" ,
375
375
  ...(payload || {}),
376
376
  };
377
377
  let storage = {};
@@ -837,6 +837,17 @@ const handleConsent = (consent, options) => {
837
837
  });
838
838
  }
839
839
  }
840
+ try {
841
+ window.dispatchEvent(new CustomEvent('edgetag-consent', {
842
+ detail: {
843
+ oldConsent: existingConsent,
844
+ newConsent: consent,
845
+ },
846
+ }));
847
+ }
848
+ catch {
849
+ // do nothing
850
+ }
840
851
  /* Calling Consent for all providers, not on instance level */
841
852
  for (const pkg of Object.values(providerPackages)) {
842
853
  if (!pkg || !pkg.name || !pkg.consent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/edgetag-sdk-js",
3
- "version": "0.46.1",
3
+ "version": "0.47.0",
4
4
  "description": "JS SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",