jsdom / webidl2js

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

Create exceptions and promises in the correct realm #251

Closed domenic closed 2 years ago

domenic commented 3 years ago

Closes #242 by superseding it.

This approach moves the ctorRegistry back to being mostly for the registration of WebIDL2JS-generated constructors. We use the globalObject variable to pass to webidl-conversions and to find our Promise and TypeError constructors.

Needs testing with jsdom before merging.

domenic commented 3 years ago

Review appreciated if either of you have time, @TimothyGu @ExE-Boss. https://github.com/jsdom/webidl2js/commit/8faa068ac83755f0294994e0d256108b790cccf3 in particular I am unsure what is going on.