mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +00:00
LibWeb: Allow using queuing strategies on globals other than Window
These interfaces are exposed on *, meaning it should work for workers and our newly added shadow realm global object by being stored on the universal global scope mixin.
This commit is contained in:
parent
13f349aea2
commit
d527c5df5d
Notes:
github-actions[bot]
2024-11-21 01:10:37 +00:00
Author: https://github.com/shannonbooth
Commit: d527c5df5d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2416
Reviewed-by: https://github.com/ADKaster ✅
10 changed files with 89 additions and 61 deletions
|
@ -0,0 +1,10 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
for (const QueuingStrategy of [CountQueuingStrategy, ByteLengthQueuingStrategy]) {
|
||||
const size1 = (new QueuingStrategy({ highWaterMark: 5 })).size;
|
||||
const size2 = (new QueuingStrategy({ highWaterMark: 10 })).size;
|
||||
println(`${QueuingStrategy.name} | size1 === size2 -> ${size1 === size2}`);
|
||||
}
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue