0๐
OnButtonPress() {
return new Promise((resolve) => {
Vue.nextTick(function () {
const confirm = document.getElementById('saveftobutton')
confirm.addEventListener('click', function() {
resolve(true);
});
const deny = document.getElementById('cancelftobutton')
deny.addEventListener('click', function() {
resolve(false);
});
});
});
},
Had to put the return before Vue.nextTick.
Source:stackexchange.com