-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Moving the amp-story-consent JSON configuration. #15473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving the amp-story-consent JSON configuration. #15473
Conversation
| this.actions_.addToWhitelist('AMP-CONSENT.accept'); | ||
| this.actions_.addToWhitelist('AMP-CONSENT.reject'); | ||
| // Story consent config is set by the `assertAndParseConfig_` method. | ||
| if (this.storyConsentConfig_) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: since you checked with user().assert() I don't think this is necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
talked offline. did this to pass linter check.
@gmajoulet You may want to add details here : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the linter didn't accept a user().assert or a /** @type {!Object} (...) */...
| const script = childElementByTag(parentEl, 'script'); | ||
| this.consentConfig_ = parseJson(script.textContent); | ||
| const consentScript = childElementByTag(parentEl, 'script'); | ||
| this.consentConfig_ = parseJson(consentScript.textContent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
zhouyx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. Thanks for the change!
9dead8c to
41afdbe
Compare
Moving the amp-story-consent JSON configuration.
Context: https://github.com/ampproject/amphtml/pull/15366/files/f48b29ca4203dd4cfce001b9555128d307551c7b#r189401119
Part of #14538