Using proxy variables in test

This commit is contained in:
David Négrier 2021-07-12 16:43:40 +02:00
parent 52fd9067b8
commit 28effd8ad4

View File

@ -12,11 +12,11 @@
WA.onInit().then(() => {
console.log('After WA init');
const textField = document.getElementById('textField');
textField.value = WA.state.loadVariable('textField');
textField.value = WA.state.textField;
textField.addEventListener('change', function (evt) {
console.log('saving variable')
WA.state.saveVariable('textField', this.value);
WA.state.textField = this.value;
});
WA.state.onVariableChange('textField').subscribe((value) => {