- From: Justin Fagnani <notifications@github.com>
- Date: Thu, 09 Aug 2018 14:08:20 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Thursday, 9 August 2018 21:08:46 UTC
I don't think this is a good idea. Even though JavaScript is flexible enough to do otherwise, a constructor should return an instance of the class being constructed. ie, `new Foo() instanceof Foo` should always be true. Static factory methods are a fine way to asynchronously create instances. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/issues/563#issuecomment-411897681
Received on Thursday, 9 August 2018 21:08:46 UTC