
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
timer-input
Advanced tools
Monitor if the value of an input or textarea element is changed, like input event.
var keyword = document.getElementById('keyword');
var kwInput = new TimerInput(keyword);
kwInput.on(function(e) {
console.log('The value of the keyword is changed!');
console.log(e); // e: { type: 'timerinput', oldValue: '', newValue: 'foo' }
});
This module supports as a CommonJS/AMD module.
NPM:
npm install timer-input
The TimerInput constructor
Create a TimerInput instance to attach/detach one or more listeners. When the value of the element is changed, the listener will be called with a TimerInputEvent object passed as the first parameter.
TimerInputEvent
type: "timerinput".oldValue: A string represents the value before changing.newValue: A string represents the value after changing.In the listener, this refers the input or textarea element.
The opts object can be passed as the second parameter:
bindEvent
Type: Boolean Default: true
It represents if the focus and blur event of the element will be listened when an TimerInput instance is created.
The TimerInput instance methods:
Set the timer. By default, when the focus event is fired, the timer will be set.
Clear the timer. By default, when the blur event is fired, the timer will be cleared.
Return the value of the element.
Use the value to update the value of the element and the listener(s) will be called, if any. If you modify the element.value directly, none of the listener(s) will be called.
Attach a listener.
Detach a listener. If no argument is passed, all exist listeners will be detached.
Execute all exist listeners with some optional parameters passed.
The input or textarea element is no longer monitored.
IE6+ and other modern browsers.
MIT
FAQs
Monitor if the value of an input or textarea element is changed
We found that timer-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.