8154f26452
First, introduce the `PersistableElement` type to incorporate `<input>`, `<textarea>`, and `<select>` elements. Next, incorporate some special handling for `HTMLSelectElement`, since they don't have a `.defaultValue` property. Support for `HTMLSelectElement` instances is generalized for both single and `[multiple]` elements by looping over [HTMLSelectElement.selectedOptions][] while persisting, then setting [HTMLSelectElement.selected][] when restoring. [HTMLSelectElement.selectedOptions]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/selectedOptions [HTMLSelectElement.selected]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionElement#instance_properties |
||
---|---|---|
.. | ||
.eslintrc.json | ||
test.js |