be-valued
v0.0.9
Published
Reflect the value of the input to the value attribute on input event.`
Maintainers
Readme
be-valued (💍)
Reflect the value of the input to the value attribute on input event.
<form be-valued>
<input>
</form>Useful for styling, persistence of innerHTML. Works with any element whose string "value" can be determined by doing oElement.value, and which emits event "input" when the value changes. Both "value" and "input" are configurable.
The enhancement continues to honor reset input elements:
<input type="reset" value="Reset the form" />by intercepting the reset event and implementing that functionality within the enhancement.
Viewing Locally
Any web server that serves static files will do but...
- Install git.
- Fork/clone this repo.
- Install node.
- Open command window to folder where you cloned this repo.
npm install
npm run serve
- Open http://localhost:8000 in a modern browser.
Importing in ES Modules:
import 'be-valued/be-valued.js';
Using from CDN:
<script type=module crossorigin=anonymous>
import 'https://esm.run/be-valued';
</script>
