- From: Leo Balter <notifications@github.com>
- Date: Thu, 13 May 2021 18:28:47 -0700
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 14 May 2021 01:29:00 UTC
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