mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-06 00:51:51 +00:00
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.
8 lines
243 B
HTML
8 lines
243 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
const realm = new ShadowRealm();
|
|
const result = realm.evaluate(`() => 1 + 1`)();
|
|
println(`Shadow realm evaluation returned: ${result}`);
|
|
});
|
|
</script>
|