Where the bytes come from
Random bytes come from crypto.getRandomValues(), a Web Crypto API method specified to use a cryptographically secure pseudo-random number generator seeded with device entropy, the same class of source that backs TLS session keys. The specification caps a single call at 65,536 bytes, so larger outputs are generated in batches; unlike the rest of the Web Crypto API, getRandomValues stays available on non-HTTPS pages.