Re: [w3ctag/design-reviews] Realms API ECMAScript Proposal (#542)

Adding more for the curiosity, if you call this specific `Foo` without `new`, it would fail at `this.one = one` because you've got a module code (strict mode always on) and so `this` is `undefined`.

```
const Foo = realm.importValue('module.js', 'Foo');
try {
  Foo();
} catch(e) {
  e.constructor === TypeError;
}
```



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/542#issuecomment-840934513

Received on Friday, 14 May 2021 01:29:00 UTC