Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leko/in-progress.js
Prevent screen transition if any state changed.
https://github.com/leko/in-progress.js
beforeunload form promise
Last synced: 13 days ago
JSON representation
Prevent screen transition if any state changed.
- Host: GitHub
- URL: https://github.com/leko/in-progress.js
- Owner: Leko
- License: mit
- Created: 2017-03-08T03:59:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T14:58:33.000Z (over 7 years ago)
- Last Synced: 2024-10-06T02:03:04.380Z (about 1 month ago)
- Topics: beforeunload, form, promise
- Language: JavaScript
- Size: 26.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
in-progress.js
Prevent screen transition if any state changed.
## Getting started
```
npm install in-progress
bower install in-progress
```## Usage
```js
import { FormValueDetector } from 'in-progress'const formElement = document.querySelector('#some-form')
const detector = new FormValueDetector(formElement)
detector.observe()
```View [live demo](https://leko.github.io/in-progress.js/)