jsdom
jsdom copied to clipboard
Allow subclasses in `crypto.getRandomValues()`
This PR fixes #3395, meaning that you can now pass subclasses of a TypedArray in crypto.getRandomValues().
This PR also checks if the webcrypto api is available in Node.js, and if so, uses that one. The webcrypto api is available in >15, so once jsdom drops support for Node 14, this can be the default implementation and no polyfilling is required anymore.