Releases: github/session-resume
Releases · github/session-resume
v0.5.2
What's Changed
- Bump body-parser from 1.19.2 to 1.20.3 in the npm_and_yarn group by @dependabot in #62
- Update publish.yml by @manuelpuyol in #63
- Bump the npm_and_yarn group with 2 updates by @dependabot in #64
- Publish with npm provenance by @dgreif in #65
New Contributors
- @manuelpuyol made their first contribution in #63
- @dgreif made their first contribution in #65
Full Changelog: v0.5.1...v0.5.2
v0.5.1
What's Changed
- Bump follow-redirects from 1.15.4 to 1.15.6 by @dependabot in #58
- Bump braces from 3.0.2 to 3.0.3 by @dependabot in #59
- Bump the npm_and_yarn group with 3 updates by @dependabot in #61
Full Changelog: v0.5.0...v0.5.1
v0.5.0
What's Changed
- Update node version in actions to v20.11 (LTS) and use
.node-version
file by @theinterned in #54 - lint after build by @theinterned in #53
- Add support for checkboxes and radio buttons by @helen in #30
- Support
select
elements by @seanpdoyle in #55
New Contributors
Full Changelog: v0.4.0...v0.5.0
v0.4.0
What's Changed
- Bump engine.io and socket.io by @dependabot in #42
- Bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in #48
- Bump json5 from 1.0.1 to 1.0.2 by @dependabot in #43
- Bump engine.io and socket.io by @dependabot in #46
- Bump http-cache-semantics from 4.1.0 to 4.1.1 by @dependabot in #45
- Bump socket.io-parser from 4.2.1 to 4.2.4 by @dependabot in #49
- Bump ua-parser-js from 0.7.31 to 0.7.33 by @dependabot in #44
- Bump got from 11.8.3 to 11.8.5 by @dependabot in #37
- Update CODEOWNERS by @theinterned in #51
- Bump follow-redirects from 1.14.9 to 1.15.4 by @dependabot in #50
- Make element filtering configurable by @seanpdoyle in #40
- Add function option documentation to
README.md
by @seanpdoyle in #52 - Support
scope:
option to scope selector query andfields:
option to skip selector query by @seanpdoyle in #20
New Contributors
- @seanpdoyle made their first contribution in #40
Full Changelog: v0.3.1...v0.4.0
v0.3.1
What's Changed
Full Changelog: v0.3.0...v0.3.1
v0.3.0
What's Changed
- Fix typos in readme by @nickrolfe in #18
- Use chromium for karma tests by @theinterned in #23
- Bump karma from 6.3.2 to 6.3.16 by @dependabot in #29
- Bump ansi-regex from 3.0.0 to 3.0.1 by @dependabot in #36
- Bump minimist from 1.2.5 to 1.2.6 by @dependabot in #35
- Bump path-parse from 1.0.6 to 1.0.7 by @dependabot in #25
- Add a release action by @koddsson in #32
- Update dependencies by @koddsson in #34
- Allow callers to pass in a Storage implementation by @Bestra in #38
New Contributors
- @nickrolfe made their first contribution in #18
- @theinterned made their first contribution in #23
- @Bestra made their first contribution in #38
Full Changelog: v0.2.0...v0.3.0
v0.2.0
0.1.0
v0.0.7
0.0.7
Session Resume
Annotate fields to be persisted on navigation away from the current page.
Fields be automatically restored when the user revists the page again in
their current browser session (excludes separate tabs).
Not design for persisted crash recovery.
Installation
$ npm install @github/session-resume
Usage
HTML
<form>
<input id="new-comment" class="js-session-resumable"/>
</form>
JS
import {persistResumableFields, restoreResumableFields, setForm} from '@github/session-resume'
function getPageID() {
return window.location.pathname
}
// Listen for all form submit events and to see if their default submission
// behavior is invoked.
window.addEventListener('submit', setForm, {capture: true})
// Resume field content on regular page loads.
window.addEventListener('pageshow', function() {
restoreResumableFields(getPageID())
})
// Persist resumable fields when page is unloaded
window.addEventListener('pagehide', function() {
persistResumableFields(getPageID())
})
Development
npm install
npm test
License
Distributed under the MIT license. See LICENSE for details.