randomUUID

Available only in secure contexts.

MDN Reference