When I implement the example of google authentication for google earth Javascript API, I got the popup to sign in blocked and I got this message on the console:
Cross-Origin-Opener-Policy policy would block the window.closed call. Lv @ cb=gapi.loaded_0?le=scs:406
I've tried to add the response headers:
var xhr = new XMLHttpRequest();
xhr.open('POST', url);
xhr.setRequestHeader('Cross-Origin-Opener-Policy', 'same-origin-allow-popups');
xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
xhr.send();
var head1 = document.getElementsByTagName('head')[0];
var meta1 = document.createElement('meta');
meta1.httpEquiv = 'Permissions-Policy';
meta1.content = 'ch-ua-form-factor=()';
head1.appendChild(meta1);
I added the permission policy because i got a warning about it.
This script has no effect.
Please help