From:  Tom Schuster <>
Date:  28 Jan 2017 06:43:56 Hong Kong Time

Please use ClassSpec for new bultin-object objects


Hey JS team!

Please try to use ClassSpec when adding a new built-in object. This
means you don't have to manually define all your properties and
methods and instead let the ClassSpec mechanism take care of this. It
will also link the prototype and stuff like that, so overall a much
nicer system.

The real reason why using ClassSpec is useful is that JSXrays
automatically make those objects work across compartments, which is
suddenly really important for WebExtensions. Because if we don't have
a ClassSpec for some object we will just fail to execute certain
content scripts that work in Chrome etc.