I have search and try few method, like directly using app.shadow.dialogue({...}.bind(this)) but getting this error
Uncaught TypeError: {(intermediate value)(intermediate value)}.bind is not a function
And trying to do this instead
let dialogue = {
"title": {
"text": "Kembali ke tes?",
"description": "Anda memiliki tes yang masih berlangsung"
},
"actions": [
{
"text": "Ya",
"class": "bg-safe",
"icon": "refresh",
"action": "direct/tes"
},{
"text": "Tidak, Lihat Hasil Sebelumnya",
"class": "bg-danger",
"icon": "close",
"action": function() {
app.shadow.stop();
this.view();
}
}
]
};
dialogue.actions[1].action.bind(this);
app.shadow.dialogue(dialogue);
but this.view still not get into scope
Uncaught TypeError: this.view is not a function
Is there a way to make this statement useable inside an object argument?
may be you can try :
`
"action":()=> {
app.shadow.stop();
this.view();
}`
hope this is useful for you.