-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MathUtils: Use crypto.randomUUID() when available. #22556
Conversation
Meh, I don't know how to make this pretty without breaking... |
You probably have to put the test |
I was trying to avoid not having to check every time. I guess I'll have to declare it outside... |
Maybe having two functions const generateUUID = ( 'randomUUID' in crypto ) ? generateUUIDCrypto : generateUUIDLegacy; |
I'm also trying to avoid having to declare |
It seems the |
Alright, lets see how this goes 🤞 |
Hmm, rollup is adding a getter: @Mugen87 I'll try your approach 👍 |
Looking good! |
Related issue: #13069
Description
Browser are adding a function for generating random UUIDs.
It's already available in Chrome, Edge and it's coming in Safari and Firefox.