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:
Shannon Booth 2024-10-26 22:07:09 +13:00 committed by Andrew Kaster
commit 9598ed1d17
Notes: github-actions[bot] 2024-11-05 17:59:34 +00:00
6 changed files with 70 additions and 0 deletions

View file

@ -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>