@iabtcf/cmpapi
Advanced tools
Comparing version 1.3.0 to 1.3.1-0
{ | ||
"name": "@iabtcf/cmpapi", | ||
"version": "1.3.0", | ||
"version": "1.3.1-0", | ||
"description": "Ensures other in-page digital marketing technologies have access to CMP transparency and consent information for the iab. Transparency and Consent Framework (TCF).", | ||
@@ -26,4 +26,4 @@ "author": "Chris Paterson <tcf@chrispaterson.io>", | ||
"devDependencies": { | ||
"@iabtcf/stub": "1.3.0", | ||
"@iabtcf/testing": "1.3.0", | ||
"@iabtcf/stub": "1.3.1-0", | ||
"@iabtcf/testing": "1.3.1-0", | ||
"@istanbuljs/nyc-config-typescript": "^0.1.3", | ||
@@ -30,0 +30,0 @@ "@types/mocha": "^5.2.7", |
@@ -184,3 +184,3 @@ [![NPM version](https://img.shields.io/npm/v/@iabtcf/cmpapi.svg?style=flat-square)](https://www.npmjs.com/package/@iabtcf/cmpapi) | ||
**Note:** `"addEventListener"` and `"removeEventListener"` can __not__ be overwritten. `"addEventListener"` utilizes the `"getTCData"` command, so to modify `TCData` responses, write a Built-In custom command for that command and both `"getTCData"` and `"addEventListener"` will utilize it. | ||
**Note:** `"addEventListener"` and `"removeEventListener"` can __not__ be overwritten. `"addEventListener"` utilizes the `"getTCData"` command, so to modify `TCData` responses, write a Built-In custom command for that command and both `"getTCData"` and `"addEventListener"` will utilize it. If the `"removeEventListener"` command is also used with a custom `"getTCData"` command, note that `"removeEventListener"` will not return `tcData` but rather a boolean that indicates if the listener was removed. So it is important to add a check, otherwise the CmpApi will catch that error and the callbacks will return with `tcData: null`. | ||
@@ -196,5 +196,11 @@ **Example** | ||
// tcData will be constructed via the TC string and can be added to here | ||
tcData.reallyImportantExtraProperty = true; | ||
/* | ||
* If using with 'removeEventListener' command, add a check to see if tcData is not a boolean. */ | ||
if (typeof tcData !== 'boolean') { | ||
// tcData will be constructed via the TC string and can be added to here | ||
tcData.reallyImportantExtraProperty = true; | ||
} | ||
// pass data and status along | ||
@@ -201,0 +207,0 @@ next(tcData, status); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59131
215
21