Annotate fields to be persisted on navigation away from the current page
MIT License
Full Changelog: https://github.com/github/session-resume/compare/v0.5.0...v0.5.1
Published by theinterned 9 months ago
.node-version
file by @theinterned in https://github.com/github/session-resume/pull/54
select
elements by @seanpdoyle in https://github.com/github/session-resume/pull/55
Full Changelog: https://github.com/github/session-resume/compare/v0.4.0...v0.5.0
Published by theinterned 9 months ago
README.md
by @seanpdoyle in https://github.com/github/session-resume/pull/52
scope:
option to scope selector query and fields:
option to skip selector query by @seanpdoyle in https://github.com/github/session-resume/pull/20
Full Changelog: https://github.com/github/session-resume/compare/v0.3.1...v0.4.0
Published by theinterned about 2 years ago
sessionStorage
in a try
block by @Bestra in https://github.com/github/session-resume/pull/39
Full Changelog: https://github.com/github/session-resume/compare/v0.3.0...v0.3.1
Published by manuelpuyol about 2 years ago
Full Changelog: https://github.com/github/session-resume/compare/v0.2.0...v0.3.0
Published by dgraham over 4 years ago
https://github.com/github/session-resume/compare/0.0.6...v0.0.7
Published by koddsson about 5 years ago
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.
$ npm install @github/session-resume
<form>
<input id="new-comment" class="js-session-resumable"/>
</form>
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())
})
npm install
npm test
Distributed under the MIT license. See LICENSE for details.
Published by koddsson about 5 years ago
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.
$ npm install @github/session-resume
<form>
<input id="new-comment" class="js-session-resumable"/>
</form>
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())
})
npm install
npm test
Distributed under the MIT license. See LICENSE for details.
Published by koddsson about 5 years ago
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.
$ npm install @github/session-resume
<form>
<input id="new-comment" class="js-session-resumable"/>
</form>
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())
})
npm install
npm test
Distributed under the MIT license. See LICENSE for details.
https://github.com/github/session-resume/compare/v0.0.4...v0.0.5
npm update
3ca559chttps://github.com/github/session-resume/compare/v0.0.3...v0.0.4