boa
boa copied to clipboard
Adjust `Realm` visibility
Currently Realm
is a public struct and it's only public method is crate()
. The only reason for this seems to be, so that we can benchmark the creation of a realm.
Either
-
Realm
is fully private and we need to change how we benchmark it, or - we should provide some functionality for the public
Realm
e.g; changing theRealm
of aContext
. But is that api usefully in any way?
For the entry point of DOM types, I think we also have to set a Window
instance to be realm's global object.
https://html.spec.whatwg.org/multipage/window-object.html#script-settings-for-window-objects
Resolved by #2801