Don't use top-level await
for storage access checks (#23793)
Closes #23743
This commit is contained in:
parent
db7ca7fb66
commit
32b373f05f
1 changed files with 12 additions and 8 deletions
|
@ -5,6 +5,9 @@
|
|||
</head>
|
||||
<body>
|
||||
<script type="module">
|
||||
checkStorageAccess();
|
||||
|
||||
async function checkStorageAccess() {
|
||||
// Check if the browser has granted us access to 3rd-party storage (such as cookies).
|
||||
const hasAccess = await hasStorageAccess();
|
||||
|
||||
|
@ -15,6 +18,7 @@
|
|||
// Otherwise, signal that 3rd-party access is not supported.
|
||||
signalSupport(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function hasStorageAccess() {
|
||||
if (!("hasStorageAccess" in document)) {
|
||||
|
|
Loading…
Reference in a new issue