Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinout Stevens committed Dec 2, 2020
1 parent 180b79c commit 73a88a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/consentManagementUsp.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ function lookupUspConsent(uspSuccess, uspError, hookConfig) {
break;
}
} catch (e) {}

try {
if (f.frames['__uspapiLocator']) {
uspapiFrame = f;
Expand Down Expand Up @@ -106,10 +107,10 @@ function lookupUspConsent(uspSuccess, uspError, hookConfig) {
// to collect the user's consent choices represented as a string (via getUSPData)

// the following code also determines where the USPAPI is located and uses the proper workflow to communicate with it:
// - use the USPAPI locator code to see if USP's located in the current window or an ancestor window. This works in friendly or cross domain iframes
// - use the USPAPI locator code to see if USP's located in the current window or an ancestor window.
// - else assume prebid is in an iframe, and use the locator to see if the CMP is located in a higher parent window. This works in cross domain iframes.
// - if USPAPI is not found, the iframe function will call the uspError exit callback to abort the rest of the USPAPI workflow
// - try to call the __uspapi() function directly, otherwise use the postMessage() api
// find the CMP frame/window

if (utils.isFn(uspapiFunction)) {
utils.logInfo('Detected USP CMP is directly accessible, calling it now...');
uspapiFunction(
Expand Down

0 comments on commit 73a88a3

Please sign in to comment.