jsdom / webidl2js

Auto-generate JS class structures for Web IDL specifications
MIT License
79 stars 30 forks source link

Add new() export for interfaces #196

Closed domenic closed 4 years ago

domenic commented 4 years ago

Closes #193.

Since I had to do some refactoring to reduce duplication anyway, this also includes general cleanup to the output, such as replacing obj with either value or wrapper, using arrow functions for our exports, and such.

Ideas welcome on further refactoring to reduce duplication, but I think it's probably easiest to wait until we can stop exporting setup(); once that's true things become simpler.

On top of #195.

domenic commented 4 years ago

I've confirmed that this works on jsdom just as well as the current master does. (The current master seems to have problems but I think they are solved by https://github.com/jsdom/jsdom/pull/2884.)