boa icon indicating copy to clipboard operation
boa copied to clipboard

Adjust `Realm` visibility

Open raskad opened this issue 3 years ago • 1 comments

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

  1. Realm is fully private and we need to change how we benchmark it, or
  2. we should provide some functionality for the public Realm e.g; changing the Realm of a Context. But is that api usefully in any way?

raskad avatar Feb 13 '22 04:02 raskad

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

wusyong avatar Jun 26 '22 19:06 wusyong

Resolved by #2801

jedel1043 avatar Apr 10 '23 14:04 jedel1043