Skip to content

Truly independent web browser

545 B
Raw Blame
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
    promiseTest(async () => {
        const context = new AudioContext();
        const weakPromises = [];
        await (async () => {
            const promise = context.suspend();
            weakPromises.push(new WeakRef(promise));
            await promise;
        })();
        await collectGarbageUntilCleared(weakPromises);
        println(`Settled suspend promise was collected: ${weakPromises[0].deref() === undefined}`);
        await context.close();
    });
</script>