1 class WordWijzer extends WordQuiz {
3 let word = this.words.shift();
5 put(this.form, '.done');
6 this.form.querySelectorAll('li[onclick]').forEach(answer => {
7 answer.removeAttribute('onclick');
13 this.question.innerHTML = '';
15 '[data-id=$] img[src=$]', word.id,
21 let answer = click.target;
22 put(answer, '.chosen');
23 console.log(this.question, answer);
24 let match = this.question.dataset.id == answer.dataset.id;
25 put(answer, match ? '.good' : '.wrong');
26 this.log('pick', answer.dataset.id, answer.index, this.question.dataset.id);
32 this.form.innerHTML = '';
33 this.question = put(this.form, 'figure');
36 let answers = put(this.form, 'ul');
38 .forEach((answer, seq) => {
39 put(answers, 'li[data-id=$][onclick=""]',
40 answer.id, answer.label, {
41 onclick: e => this.verify(e),