revision:
The requestStorageAccess() method of the Document interface allows a document loaded in a third-party context (i.e. embedded in an <iframe>) to request access to unpartitioned cookies.
This is relevant to user agents that by default block access to unpartitioned cookies by sites loaded in a third-party context to improve privacy (e.g. to prevent tracking), and is part of the Storage Access API.
requestStorageAccess()
Parameters: none
<script> document.requestStorageAccess().then( () => { console.log("access granted"); }, () => { console.log("access denied"); } ); </script>