Skip to content

Commit

Permalink
Hide the third party cookie detection iframe (#1808)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakeii authored Feb 19, 2025
1 parent 6f4fe3a commit 6d25577
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/moody-kangaroos-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@guardian/commercial': patch
---

Hide the third party cookie iframe
2 changes: 2 additions & 0 deletions src/lib/third-party-cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const isTPCTestPayload = (payload: unknown): payload is TPCTestPayload =>
**/
const checkThirdPartyCookiesEnabled = (): void => {
const crossSiteIrame = document.createElement('iframe');

crossSiteIrame.style.display = 'none';
crossSiteIrame.src = `${window.guardian.config.frontendAssetsFullURL}commercial/tpc-test/v1/index.html`;

window.addEventListener('message', ({ data }) => {
Expand Down

0 comments on commit 6d25577

Please sign in to comment.