RE: [webidl] Defining constructors on non-global objects?

From: Rick Waldron [mailto:waldron.rick@gmail.com] 

> Currently: nothing.

Upon reviewing https://github.com/rwaldron/sensors, this doesn't seem as bad as I feared. It turns out it's being used as an abstract base class, not as a non-constructible class. (That is, unlike many non-constructible classes in the platform, instances of Sensor do not exist; only instances of it subclasses.) Abstract base classes are pretty rare in JS (in my experience, at least) but are a fine pattern.

That said, I filed https://github.com/rwaldron/sensors/issues/1 to track whether the abstract base class should be the same as the namespace object. I don't quite understand why they should be the same.

Received on Friday, 5 September 2014 17:56:38 UTC