I'd like to subscribe for all changes of value
property in all inputs using custom setter:
Object.defineProperty(HTMLInputElement.prototype, 'value', {
set: function(newValue) {
// do some logic here
// WHAT PUT HERE to call "super setter"?
}
});
If I use this.value = newValue;
I'm getting Maximum call stack size exceeded
which is quite right but...
Nevermind. What should I call to change value
in correct way? Here is
JSFIDDLE with more detailed explanation.