mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Hook up the HostInitializeShadowRealm callback
This is enough for a basic shadow realm to work :^) There is more that we still need to implement here such as module loading and fixing up the global object, but this is enough to get some basic usage working.
This commit is contained in:
parent
b24cd3ecf6
commit
9598ed1d17
Notes:
github-actions[bot]
2024-11-05 17:59:34 +00:00
Author: https://github.com/shannonbooth
Commit: 9598ed1d17
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1993
Reviewed-by: https://github.com/ADKaster ✅
6 changed files with 70 additions and 0 deletions
|
@ -0,0 +1,13 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const realm = new ShadowRealm()
|
||||
const aSync = realm.evaluate(`async () => 1 + 1`);
|
||||
try {
|
||||
aSync();
|
||||
println('Fail! No exception thrown');
|
||||
} catch (e) {
|
||||
println(`PASS: Exception thrown '${e}'`);
|
||||
}
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue