Closed ghost closed 3 years ago
This proposal does not propose to allow setting the seed for Math.random
. It's basically exactly what you're asking for already. See readme.
My apologies, I completely skipped that first section, in that case, this issue is completely irrelevant.
Being able to seed
Math.random
would affect all code on a web page, potentially causing security vulnerabilities in some applications and/or situations, that depend on random numbers, that didn't use crypto or SubtleCrypto.How about, instead, offering a function that returns a seeded random generator?
Example usage:
This would scope the amount of effect that it can have.