You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we say "a new X object in targetRealm". To rigorize this, I suggest defining either the prose phrase a default-constructed JS X object in targetRealm or an abstract operation ConstructJSIntrinsic("name", targetRealm) which does the following steps:
Let constructor be targetRealm.[[Intrinsics]].[[%X%]].
Return ? Construct(constructor, « »).
This could be located in our https://html.spec.whatwg.org/#dependencies JavaScript section, or in the structured serialization section. It should not be exported for other specs.
Alternately it should perhaps be located in Web IDL?
Then we can use this to replace all our "a new X object in targetRealm", linking to its definition.
The text was updated successfully, but these errors were encountered:
Does IDL allocate JavaScript objects other than Array currently? Also, shouldn't JavaScript host this definition itself? Won't they need it with the Realms API if that makes it through?
Does IDL allocate JavaScript objects other than Array currently?
Well, it does ObjectCreate(%ObjectPrototype%) a lot, but that's easy. I guess it also uses backing Map objects, currently via the imprecise wording "... must have a [[BackingMap]] internal slot, which is initially set to a newly created Map object." So it would probably benefit.
Also, shouldn't JavaScript host this definition itself? Won't they need it with the Realms API if that makes it through?
I can't see why the realms API would need this. This is only necessary if specs need to default-construct objects themselves, which seems useful for the platform but rare for the JS spec.
This spins off from tc39/ecma262#418.
Currently we say "a new X object in targetRealm". To rigorize this, I suggest defining either the prose phrase
a default-constructed JS X object in targetRealm
or an abstract operation ConstructJSIntrinsic("name", targetRealm) which does the following steps:This could be located in our https://html.spec.whatwg.org/#dependencies JavaScript section, or in the structured serialization section. It should not be exported for other specs.
Alternately it should perhaps be located in Web IDL?
Then we can use this to replace all our "a new X object in targetRealm", linking to its definition.
The text was updated successfully, but these errors were encountered: