LibWeb: Wire up UniversalGlobalScopeMixin to ShadowRealmGlobalScope

This commit is contained in:
Shannon Booth 2024-11-08 16:35:16 +13:00 committed by Andrew Kaster
commit 457cdd0cc3
Notes: github-actions[bot] 2024-11-09 19:37:09 +00:00
19 changed files with 216 additions and 110 deletions

View file

@ -0,0 +1,8 @@
<script src="../include.js"></script>
<script>
test(() => {
const realm = new ShadowRealm();
const result = realm.evaluate(`() => self.btoa('Hello, world!')`)();
println(`Shadow realm evaluation returned: ${result}`);
});
</script>

View file

@ -0,0 +1,8 @@
<script src="../include.js"></script>
<script>
test(() => {
const realm = new ShadowRealm();
const result = realm.evaluate(`() => new URL('https://example.com/path?name=value').hostname`)();
println(`Shadow realm evaluation returned: ${result}`);
});
</script>