Uses a module-level counter combined with a short random suffix. Avoids
crypto.randomUUID(), which is only defined in secure contexts
(https/localhost) and throws on plain-HTTP pages — the exact CDN
script-tag scenario this adapter targets.
NOTE: this helper is duplicated in frappe/selectors.ts; a shared
adapter utility module is a good follow-up once one exists.
Generates a unique ID with the given prefix.
Uses a module-level counter combined with a short random suffix. Avoids
crypto.randomUUID(), which is only defined in secure contexts (https/localhost) and throws on plain-HTTP pages — the exact CDN script-tag scenario this adapter targets.NOTE: this helper is duplicated in
frappe/selectors.ts; a shared adapter utility module is a good follow-up once one exists.