crypto.randomUUID needs a secure context and is absent in some test
environments, so this falls back to getRandomValues and, failing that,
to Math.random. The fallback is for uniqueness within a client-side
dataset, not for anything security-bearing.
Fresh RFC-4122 v4 identifier.
crypto.randomUUIDneeds a secure context and is absent in some test environments, so this falls back togetRandomValuesand, failing that, toMath.random. The fallback is for uniqueness within a client-side dataset, not for anything security-bearing.