mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02: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:
committed by
Andrew Kaster
parent
13f349aea2
commit
d527c5df5d
Notes:
github-actions[bot]
2024-11-21 01:10:37 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/d527c5df5d3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2416 Reviewed-by: https://github.com/ADKaster ✅
@@ -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>
|
||||
Reference in New Issue
Block a user