mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 08:10:02 +00:00
LibWeb: Wire up UniversalGlobalScopeMixin to ShadowRealmGlobalScope
This commit is contained in:
parent
2ea31fad32
commit
457cdd0cc3
Notes:
github-actions[bot]
2024-11-09 19:37:09 +00:00
Author: https://github.com/shannonbooth
Commit: 457cdd0cc3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2220
Reviewed-by: https://github.com/ADKaster ✅
19 changed files with 216 additions and 110 deletions
8
Tests/LibWeb/Text/input/HTML/shadow-realm-btoa.html
Normal file
8
Tests/LibWeb/Text/input/HTML/shadow-realm-btoa.html
Normal 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>
|
8
Tests/LibWeb/Text/input/HTML/shadow-realm-url.html
Normal file
8
Tests/LibWeb/Text/input/HTML/shadow-realm-url.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue