Introduced clear all button
This commit is contained in:
@@ -14,6 +14,8 @@ class HomeworkVocabularyTask extends HomeworkElement {
|
||||
this.setAttribute("state", "edit")
|
||||
this.deleteButton = this.querySelector('img#delete')
|
||||
this.deleteButton.addEventListener("click", this.deleteTask.bind(this))
|
||||
this.sourceText = this.querySelector("input#source")
|
||||
this.targetText = this.querySelector("input#target")
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
@@ -28,5 +30,13 @@ class HomeworkVocabularyTask extends HomeworkElement {
|
||||
getId() {
|
||||
return this.id
|
||||
}
|
||||
|
||||
setSourceText(text) {
|
||||
this.sourceText.value = text
|
||||
}
|
||||
|
||||
setTargetText(text) {
|
||||
this.targetText.value = text
|
||||
}
|
||||
}
|
||||
customElements.define('homework-vocabulary-task', HomeworkVocabularyTask)
|
||||
Reference in New Issue
Block a user