capricorn86 / happy-dom

A JavaScript implementation of a web browser without its graphical user interface
MIT License
3.29k stars 201 forks source link

Support `crypto` #1050

Closed Ayc0 closed 1 year ago

Ayc0 commented 1 year ago

In the DOM, there is window.crypto:

image

Should it be built within HappyDOM? Note: it can be built using the native node's cypto's webcrypto:

import { webcrypto } from 'node:crypto';
capricorn86 commented 1 year ago

Yes it should be part of Window, but it has not been added yet. Using 'node:crypto' sounds like a good idea.

Ayc0 commented 1 year ago

I opened https://github.com/capricorn86/happy-dom/pull/1061 to fix this issue