* Creates a local storage key for the given form. * * @param {HTMLFormElement} form The form to create a storage key for. * * @return {String} The unique form storage key. * @throws {Error} If given a form without an id or uuid.
(form, uuid)
| 345 | * @throws {Error} If given a form without an id or uuid. |
| 346 | */ |
| 347 | function getStorageKey(form, uuid) { |
| 348 | if (!uuid && !form.id) { |
| 349 | throw Error('form persistence requires a form id or uuid') |
| 350 | } |
| 351 | return 'form#' + (uuid ? uuid : form.id) |
| 352 | } |
| 353 | |
| 354 | /** |
| 355 | * Return the public interface of FormPersistence. |
no outgoing calls
no test coverage detected