const data = {}
const input = document.getElementById('input')
Object.defineProperty(data, 'text', {
set(value) {
this.inputValue = value
},
get(value) {
return this.inputValue
}
})
input.onChange = function (val) {
data.text = val.target.value
}